On which platforme show i run this project ?
This project is can only run on Windows OS machines, and that's because Web Sockets are a down level utilities, used to establish communication between two nodes.
Environment setup :
Now before compiling your project you should set up your environment :
- Install gcc compiler link here
How to compile and run the project
Inside the project folder there are two files, server.c which basiclly defines the server socket and builds up the server and we have also client.c file which configures the client socket and connect to the server in order to start sending requests.
- Compile server.c file
gcc app/server.c -o server -lws2_32 -ladvapi32
- Compile client.c file
gcc app/client.c -o client -lws2_32 -ladvapi32
- Run the server.exe program first by executing the following command :
./server
- will the server is know listening on the socket, we should run the client.exe program :
./client
👏 👏 Great job !!
Client-Server Lifecycle :