3) start the server first, run the server object file with a port number (some number between 2000 and 65535) in the server window (just pick one of the two). For example: ./server 51717
once the server runs, it will wait for the client to connect.
4) Start the client in the other putty window with two arguments: the host name (such as linux.cse.tamu.edu) and the port number used to start the server (int this case: 51717). For example:
./client linux.cse.tamu.edu 51717
Once you start the client, the client can send a message to the server. Type a message, enter it, and the server will receive it. Once the server receives the message, it will display it on the server window and terminate. These files can be modified so that it won't terminate after sending only one message.
If you run the server immediately for the second time using the same port number, the server won't accept this number because it says that it is being used. This is because it takes a couple of minutes for the server to release this port number. So in this case you can either run the server using a different name, or wait a couple of minutes before running the server again with the same port number.