Multi Client Chat Application Using Sockets
-
Create Server object file
Type the following command in your terminal :
-
Run the server :
Type the following command in your terminal :
-
Create Client object file :
Type the following command in another terminal :
-
Run the Client :
Type the following command in another terminal :
It will ask for an IP and PORT. The PORT is hardcoded as 8000 but can be changed in the "client.c" file. You can set the IP to be the IP of the device you are running the server in (127.0.0.1 for localhost).
-
Run as many clients as you want in different machines connected to the same network.
-
Enjoy!