This project is a basic implementation of socket programming using two protocols namely TCP and UDP.
Follow these steps to run the program in your pc.
-
Clone the repository.
-
Go to the folder TCP or UDP as you wish.
-
Run following commands in your terminal.
g++ -o testServer server.cpp
./testServer <port_number>
-
Open a new window of terminal in current folder and run following commands.
g++ -o testClient client.cpp
./testClient localhost <port_number>
Note - The commands given in step 3 and 4 assumes that you have gcc installed on your system.
Image of TCP
Image of UDP
This project is developed entirely in C++.
Currently only one client can connect and send messages to the server at a time. I am thinking about making the server able to handle multiple clients at a time.