Solution for Homework 5

Here are a sample UDP clientand server UDP which I found at RPI's CS dept..

As usual compile with
gcc client_udp.c -o client_udp
and
gcc server_udp.c -o server_udp

Then start the server with, e.g., ./server_udp 9999 where the command line argument is the port number for the server.

In a different window (or on a different computer) invoke the client with e.g., ./client_udp 127.0.0.1 9999. The first argument is the server's IP address (or name, try it out with e.g., localhost!) and the second parameter is the server's port number. You will be prompted for a message to send to the server.


(pparis AT gmu DOT edu)

Last modified: Mon Mar 5 11:59:59 EST 2007