-
Written without third-party libraries, this server uses only the standard C library and system calls(socket(), connect(), send(), recv(), etc.), for socket programming and handling client connections.
-
TCP Server for Handling Client Connections. This is a simple multi-client TCP server implemented in C that listens for incoming connections on port 1001
-
Compile the server:
gcc streamsocketserver.c -o server
-
Run the server:
./server
- The server will now be listening on port 1001 and waiting for client connections.
- The client connects to the server running on PORT 1001 and sends/receives messages.
- It first establishes a connection to the server, receives a welcome message, and then allows the user to send messages to the server.
-
Compile the client:
gcc streamsocketclient.c -o client
-
Run the server:
./client