Implementing reliable protocol of the udp to transfer a video file.
The protocol is made reliable using the following techniques:
- Sequence numbers
- Retransmission (selective repeat)
- Window size of 5-10 UDP segments (stop n wait)
- Re ordering on receiver side
- C++
- Linux
- Clone the repo
git clone https://github.com/imranzaheer612/reliableUDP.git
- change dir to reliableUDP then specify the port number and the video file you want to use in client.c and server.c . Also change the server ip in case of LAN.
#define VIDEO_FILE "testFiles/sampleVideo.mp4"
#define PORT 8080
#define SERVER_ADDR "192.168.239.128"
- Start the server first
gcc server.c -o server -lpthread
./server
- Then start the client
gcc client.c -o client -lpthread
./client
If you run the code directly via IDE(vscode) there could be chance the code is not compiled keeping in view the pthread library. You can compile it manually as the above given command by adding -lpthread in the commands.
This project is licensed under the [MIT] License - see the LICENSE.md file for details
This repo helped alot.