UDP echo client and server code. The server creates a UDP socket and waits for incoming UDP datagrams (after printing out the port assigned by the operating system). Each time a new datagram is received, the server sends the datagram unchanged back to the sender. The server also prints out the IP address and port number of the client. ----------------- The client reads from standard input until end of file (^D) and sends the whole thing as a single datagram to the server specified by the command line parameters. The parameters are the hostname and the port number. The client calls gethostbyname to determine the IP address of the server. For example, to tell the client that the server is running on the machine foo.cs.rpi.edu and on port 2030 the client should be started like this: client foo.cs.rpi.edu 2030 Once the client sends a datagram it waits until it receives a datagram and then writes the data received to stdout. Since the server is the only process that knows the port number of the client, we assume it is the only process that could be sending anything... Questions should be sent to netprog@cs.rpi.edu