gcc server.c -o server
gcc client.c -o client
./server <Port Number>
./server 3000
./client <Physical IP> <Port Number>
./client 192.168.123.123 3000
Polling and non-blocking mechanisms are used to provide concurrent communication between multiple clients and a single server.
The server has a timeout set to 1 minute. If a client is not connected to the server for more than 1 minute, the server will shutdown automatically. The client can be shutdown by entering "EXIT" when user is asked for input message.
Received messages are displayed between two pipe characters (e.g. |my_message|); this allows easy readability and error detectability.
Polling: https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzab6/poll.htm
Socket API: https://linux.die.net/
gcc server.c -o server
gcc client.c -o client
./server <Port Number>
./server 3000
./client <Physical IP> <Port Number> <File Name>
./client 192.168.123.123 3000