Client-Server Program by Bryce Schroeder Based heavily on the program examples by Beej. Usage: client hostname PORT server PORT Example: ./server 41000 ./client localhost 41000 Client Operation: Open connection to server. Receive a short message from the server and print it. Prompt the user for one line of input and send it to the server. Receive the server's response and print it out. Close the socket and terminate. Server operation: Establish the socket and set it to listen for connections. Loop indefiniately, accept each connection and do this: send a short 'connected' message receive a message from the client and print it echo the client's message back to it disconnect and reset for the next client. This version of the server does not use forking or threading. If a second client attempts to connect while the first is still being serviced, there is no provision for handling this except for the fact that socket naturally supports waiting for additional clients that want to connect.