This project is borrowed from the computer science department at Loyola Marymount:
http://cs.lmu.edu/~ray/notes/javanetexamples/
The project is a sequence of increasingly complicated client- server applications using Java sockets.
Version 1
Date Server
The first server listens on a port and prints the date when a client connects. You can connect using the Unix utility nc (if installed) or using a simple client that connects to the server and prints the server's response.
$ nc localhost 59090
Check that your server is running using the Unix netstat utility:
$ netstat -an | grep
Version 2
Server with threads. The server echoes what it receives. The client takes input from the command line and fires it off to the server.