Java networking with sockets demo

This demo networking code was written by CPE 205 students. Unfortunately the source code has no comments.

You can run the demo on a single computer or over a network. Assuming you are running over a network, on each computer you will need to compile the two source files:

SocketDemo.java and SocketHandler.java

Run the SocketDemo program on each computer. The Main Screen will appear as shown below.

Decide which computer you want to be the host, then click "Get IP Number". The IP number for that computer will appear in the label to the right of the button.
Tell the person at the other computer what the host IP number is.
Click the "HOST" button and wait.

Once the host computer is listening, on the second computer, enter the host computer's IP number in the text field labeled "IP:" and click the "Connect" button.

On the host computer screen, the IP number will appear on the "User2" line.

Now click the "Move" button on either computer and observe the totals being counted on both computers.

If running on a single computer, start two command windows and run the SocketDemo program in each window.