Project 1

Basic Socket Communication

Write a client program that sends a "hello" to another host and waits for a response. And write a server program that waits for the "hello" and responds. Do this with both UDP and TCP. See UDP-info and TCP-info for a step-by-step guide on how to do this. In all cases, the server program should record each client program's hello message and gives its own response. The client program should record the response from the servers. Do this with both TCP and UDP. Include as arguments the port used and, for the client, include an argument of the destination IP address and port.

What to turn in: Source code for two programs, one for UDP and one for TCP. Screen-shots of the output of the UDP program and screen-shots of the output of the TCP program. Screen-shot of the IDE debugger stopped at the point where the client has received the reply from the server.

For details on socket programming, see general socket info. �