Implementation of a Chat Program using TCP Sockets
Project Conducted in the Computer Network Class


The goal of this project was to implement a chat program using TCP sockets. The program should provide multiple chat rooms, and allow users in different chat rooms to send private messages to each other.
When a client connects to the server, the server creates a User
object that holds the socket.
The string input by the user on the client-side is encoded into an appropriate message and sent to the server, where the Processor
performs the corresponding action based on the received message.
The Processor
manipulates instances of User
and Room
while performing the action.
For example, if the action is "send", the content of the message is sent to other User
objects in the same Room
.
The client that receives the message interprets it and displays it on the terminal.