Skip to content

Picklemaster09/tcp-over-udp-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TCP over UDP in Python

This project implements a custom TCP protocol over UDP using Python. The goal is to simulate TCP-like behavior (reliability, ordering, and connection management) on top of UDP, which is inherently connectionless and unreliable.

Features

  • Connection establishment and teardown using a custom handshake
  • Reliable data transfer with packet acknowledgments
  • Fully functional file transfer that can resume even if the connection is interrupted and reconnected
  • Packet ordering and reassembly to ensure data integrity

Requirements

  • Python 3.7+
  • Windows: requires PyQt5
    pip install PyQt5
    

Usage

  1. Run the script (script.py) on both machines (or on the same machine using localhost).
  2. When prompted, enter the IP address of the other user:
    • Use localhost for testing on the same PC.
    • Use the actual IP address for communication across machines.
  3. Choose a user profile:
    • user0 on one device and user1 on the other device (predefined settings that work together), or
    • user2 (custom mode, where you can manually set listening port, sending port, and packet size).
  4. After the handshake completes, you can:
    • Send text messages → just type your message in the terminal and press Enter.
    • Send a file → type file and press Enter, then select a file from your system to send.
    • Change download path → type path and press Enter, then enter a new folder path (by default, files are saved in the same directory as the script).
    • Exit the connection → type exit and press Enter to gracefully close the session.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages