Skip to content

claudioavgo/reliable-transfer-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Reliable Data Transfer Simulator

A TCP-based simulation of Go-Back-N (GBN) and Selective Repeat (SR) reliable data transfer protocols implemented in Python using sockets. The project includes both sender and receiver logic with features like packet sequencing, checksum validation, acknowledgments, and window-based flow control.

Project Structure:

  • client.py – Sender: implements packet creation and transmission
  • server.py – Receiver: validates and acknowledges packets
  • README – Project documentation

Features:

  • Packet structure includes:

    • Sequence number
    • Checksum
    • Payload
  • Checksum validation for data integrity

  • Two protocols supported:

    • Go-Back-N: Resends all packets from a lost one
    • Selective Repeat: Only resends corrupted or lost packets
  • Receiver (server):

    • Accepts connections
    • Negotiates protocol (GBN or SR)
    • Validates packets and sends ACKs/NAKs
  • Sender (client):

    • Sends either a single packet or a burst (batch)
    • Dynamically adjusts congestion window based on feedback
    • Handles timeouts and retransmissions

How to Run:

  1. Start the server: python server.py

  2. Run the client in another terminal: python client.py

  3. Follow the on-screen prompts to:

    • Choose the protocol (GBN or SR)
    • Choose the mode (single packet or burst)
    • Monitor acknowledgments, retransmissions, and congestion window behavior

Requirements:

  • Python 3.x
  • No external libraries needed (uses built-in socket and struct)

Author:

Cláudio Alves Gonçalves de Oliveira Email: hi@claudioav.com

License:

MIT License – free to use, modify, and distribute.

About

Simulation of Go-Back-N and Selective Repeat protocols in Python with TCP sockets and dynamic window control.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages