Skip to content
Snippets Groups Projects
user avatar
Simon32220 authored
854bc850
History

Schnitzler Homework 2


Description

Modification of TcpExample3 and adding some code to implement a chat room with multiple clients.

The 'SchnitzlerServer' class sets up a server that listens for incoming client connections on port 2317. When a client connects, the server creates a new handler thread for managing communication with that client. For a successful connection a password must be entered. After that each client's messages are broadcast to all other connected clients.

The 'SchnitzlerClient' class connects to a server running on localhost at port 2317. It sends user input from the console to the server and displays messages received from the server.