This project provides a simple TCP socket server example implemented in C, demonstrating multi-threading using epoll for efficient event handling. It serves as a sample project to understand basic socket programming concepts.
- Clone this repository.
- Navigate to the project directory.
- Run
make
to build the server executable using GCC directly. - Run executable:
./server
- Ensure you have CMake installed on your system.
- Clone this repository.
- Navigate to the project directory.
- Create a build directory:
mkdir build && cd build
. - Run CMake:
cmake ..
. - Build the project:
cmake --build .
. - Run executable:
./socket_example
- After building the project, run the executable generated.
- The server will listen for incoming connections on port 3000.
- Connect to the server using a TCP client (e.g., telnet, netcat).
- Send messages to the server, and it will echo them back.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the GPL-3 License. See the LICENSE file for details.