Skip to content

Latest commit

 

History

History
executable file
·
57 lines (41 loc) · 1.36 KB

README.md

File metadata and controls

executable file
·
57 lines (41 loc) · 1.36 KB

Reliable UDP

Implementing reliable protocol of the udp to transfer a video file.

Description

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

Getting Started

Dependencies

  • C++
  • Linux

Installing

  • 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"

Executing program

  • Start the server first
gcc server.c -o server -lpthread
./server
  • Then start the client
gcc client.c -o client -lpthread
./client

Help

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.

License

This project is licensed under the [MIT] License - see the LICENSE.md file for details

Acknowledgments

This repo helped alot.