C Networking Program Project
Description
Write a program in C that optionally accepts an address and a port from the command line.
If there is no address/port on the command line, it should create a TCP socket and print the address (server mode).
If there is an address/port, it should connect to it (client mode). Once the connections are set up, each side should enter a loop of receive, print what it received, then send a message. The message should be “ping” from the client and “pong” from the server.
All functionality should be in the same .c file.
Hints:
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."