This repository contains a concurrent TCP server and client implemented in C++. The server is designed to handle multiple simultaneous connections using pthreads, and the client can connect to the server, send messages, and receive responses. The server is optimized for concurrent connections, and its capacity depends on system resources such as CPU and RAM.
clone this repository :
git clone https://github.com/halloweeks/networking.git
cd networking
-
Compile and run the server.
g++ server.cpp -o server -pthread ./server
-
The server will start and listen for incoming connections. It is optimized for concurrent connections, and its capacity depends on system resources.
-
Open a new terminal window.
-
Compile and run the client.
g++ client.cpp -o client ./client
-
The client will connect to the server. Enter messages to send to the server.
- The server is optimized for concurrent connections.
- The maximum number of concurrent connections depends on your system's CPU, RAM, and other resources.
- During testing, the server successfully handled up to 200 concurrent connections.