This is a basic single-threaded TCP server with an event loop using the poll system call, written in C, without any third-party library. The server listens on a port and echoes back received data. I've also written a simple client to test the server.
For details on the resources utilized in this project, please refer to the section provided below.
-
Clone the repository
-
Compile client and server programs (don't worry, there's a Makefile to do this for you)
make
-
Run the server (it will run on port 3001)
./bin/server
-
Run the client in another terminal
./bin/client
-
Type something in the client terminal and press enter. You should see the server echoing back what you typed.
-
Ctrl+C to stop the server and client.