An Exercise For You. The Updated Client/Server Application

Task: Update the code for the client/server example in the section called “The TCP Client/Server” to do the following:

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.

Figure 10.13. My Date Client Exercise Solution

My Date Client Exercise Solution

Figure 10.14. My Date Server Exercise Solution

My Date Server Exercise Solution