Skip to content
Snippets Groups Projects
README.md 1007 B

Homework 2:

For this assignment, I utilized the framework classes from the example 4 we disected in class.

The three files—HW2Client, HW2Server, HW2Thread— work together to create a simple client-server application. The server class is the main server program, listening for incoming client connections on a specified port 2317. When the client connects, the server runs HW2Thread to handle the communication with that client, allowing the server to manage multiple clients concurrently. The thread class is responsible for processing the client's input and sending an appropriate response back, after which it closes the connection. On the client side, the client class connects to the server, sends a message "Ethan", and receives a response. The client measures the time taken for the interaction and handles multiple iterations if specified. Overall, the server/client interact through a series of messages, with the server capable of handling multiple clients simultaneously through threading.