Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 800 Bytes

README.md

File metadata and controls

29 lines (26 loc) · 800 Bytes

TCP Client Server Test in C

Adapted from: Suyash https://gist.github.com/suyash/2488ff6996c98a8ee3a84fe3198a6f85
Multiple client extension adapted from: GeeksforGeeks https://www.geeksforgeeks.org/socket-programming-in-cc-handling-multiple-clients-on-server-without-multi-threading/

Build

cd build
cmake ..
make client
make server

Run

1st Terminal:

cd build
./server

2nd Terminal:

cd build
./client

If you want to distinguish between multiple running clients you can specify a client ID as a command line argument like this:

cd build
./client CLIENT_ID