In this class we will create a peer-to-peer chat program using Java sockets.

Protocol:

Exercises:

  1. Create the class Endpoint that stores an IP address-port pair. Its fields are an InetAddress and an int.

    Write a constructor that takes a string as argument in the following format: "ipaddress:port".

  2. Create a class ChatSession.

  3. Create a class ChatClient.