A simple TCP server and client implementation in C++ for basic network communication.
- Server Mode: Accepts incoming connections and echoes messages
- Client Mode: Connects to server and sends messages
- Cross-platform: Uses standard POSIX sockets
makemake clean./main server <port>Example:
./main server 1234./main client <port> [host] [message]Examples:
./main client 8080
./main client 8080 localhost
./main client 8080 127.0.01 "Hello World"port: Port number (1-65535)host: Server hostname/IP (default: 127.0.0.1)message: Message to send (default: "hello")
- C++11 or later
- POSIX-compliant system (Linux, macOS, Unix)
- Standard build tools (gcc/g++, clang++, make)