Task: Update the code for the client/server example in the section called “The TCP Client/Server” to do the following:
Change the port that the application works on 6060.
Allow the client to shutdown the server by sending the command "ShutDown".
Get the server to display (on the server) the hostname of the client that has sent any request and its local port number.
Hint: No hints, just get rid of that infinite loop!
See my application working below with the client in Figure 10.13, “My Date Client Exercise Solution” and the server in Figure 10.14, “My Date Server Exercise Solution”. I have run it twice in this case to show you that the client port is different every time that it connects.
© 2006
Dr. Derek Molloy
(DCU).