keehar.net

  • / home
  • / about
  • / blog

  • data streams
  • projects
  • / photos

  • actions
  • / contact

  • k.net | tcp-like transfer over udp

    tcp-like transfer over udp



    The goal of this project was to provide TCP-like reliability over UDP transfer protocol.
    This included creating 100% transfer reliability, packet headers/information, connection establishment handshakes, and more.
    This helped me not only fully understand these transfer protocols, but also results in a faster transfer with the same reliability as TCP.

    Created with python using no external libraries

    If for some reason you would actually want to use this:
     1. Open a terminal in the location you would like to receive the file, with the repository cloned.
     2. Copy the file you would like to send into the cloned repository's project3/src/.
     3. In the receiving terminal, run the following python3 ./server.py 5000 > RECEIVED_FILE
     4. In the sending terminal, run the following cat FILENAME | python3 ./client.py HOSTNAME-OR-IP 5000
     5. Compare the two with: diff FILENAME RECEIVED_FILE (to show 100% transmission)

    design

    design of receiver end

    server.py


    client.py

    ×
    ×