A lightweight, efficient TCP server implementation in pure C. This project provides a simple echo server with a client example for testing.
- ✨ Simple and clean C implementation
- 🚀 Lightweight and fast
- 🔌 Configurable port
- 📡 Echo server functionality
- 🧪 Includes test client
- 🛠️ Easy to build with Makefile
makeThis will compile both the server and client executables.
Run the server with default port (8080):
./tcp_serverOr specify a custom port:
./tcp_server 9000Connect to server on localhost:
./tcp_clientConnect to a specific server and port:
./tcp_client 192.168.1.100 9000You can also test the server using netcat:
nc localhost 8080- tcp_server.c: Main server implementation with connection handling
- tcp_client.c: Simple client for testing server functionality
- Makefile: Build configuration
Default settings in tcp_server.c:
PORT: 8080BUFFER_SIZE: 1024 bytesMAX_CLIENTS: 10 concurrent connections
- Multi-threaded connection handling
- SSL/TLS support
- Custom protocol implementation
- Connection pooling
- Logging system
MIT License
Created with ❤️ for learning and development