Write a time server and time client. Both programs should use the UDP transport protocol.
Your time client should send a request for the time to the server. The server should respond by querying the system for the time, to be expressed as a 32-bit integer number of seconds since the beginning of January 1, 1970. (Both Windows and Unix keep this number.) The server should put the integer into network byte-order, insert it into a packet, and send it to the client.
The client should wait a short amount of time for a response; if the response doesn't come, it should send off another request, and repeat up to ten times before giving up. When a reply arrives, the client should convert the integer into host byte-order, and print out the number and the corresponding time on the command line. I suggest that both client and server should print out informative messages so that you can see what is going on. Once they are known to be working properly, you can turn the messages off.
The standard port number for the network time protocol is 37. Use a port number above 1024 for your server until it is working properly. Then reset it to use 37 and use your programs instead of the supplied time client and server.