shamohamin / Datalink-Protocol

Reliable Data Transfer Protocols (go-back-n, stop-and-wait)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DATA-LINK-PROTOCOL

This Project Is a Simple Implementation Of HDLC And Go-Back-ARQ Protocol, Which Is Written In Golang Using TCP Socket.

Frame Structure

  • structure:
    • Information: which hold information of frames (it depeneds on frame length)
    • StartFlag: for distinguishing the start of frame (1 byte)
    • EndFlag: for distinguishing the end of frame (1 byte)
    • Control: for holding the sequence number and address (2 byte) Frame Structure

Frame Types

  • types:
    • FrameData: for sending information frame
    • FrameSupervised: for sending acknowledge frames
    • FrameReject: for sending rejected acknowledge frames
    • FrameDisconnect: for disconnecting the connection Frame Types

Start

    (running server)
    cd server
        go run server.go pass window size
    
    (running client)
    cd client
        go run client.go pass frame length
    
    (running with python)
    python3 -m venv env
        source env/bin/activate 
            (env) python runner.py

Screenshots

  • Different Frame Length Frame Length

  • Performance Different Windows Sizes Frame Length

About

Reliable Data Transfer Protocols (go-back-n, stop-and-wait)


Languages

Language:Go 81.6%Language:Python 18.4%