This project provides a low-latency C++ socket-based communication system featuring a multithreaded server and a responsive client application for real-time messaging.
- Multithreaded server supporting multiple clients.
- Real-time message broadcasting with low latency.
- Optimized networking using non-blocking I/O and select-based monitoring.
- Efficient connection management with error handling.
- Windows OS
- Microsoft Visual Studio or a compatible C++ compiler
- Winsock2 library (included in Windows SDK)
- Open the server code in your C++ IDE.
- Compile the server code to generate the executable.
- Run the server executable. It will start listening on port
9909.
- Open the client code in your C++ IDE.
- Compile the client code to generate the executable.
- Run the client executable and connect to the server using IP
127.0.0.1and port9909.
- Start the server first and then run one or more clients.
- Type a message in the client console to send it to the server.
- Messages will be broadcast to all connected clients.
- server.cpp: Contains the multithreaded server code.
- client.cpp: Contains the client application code.