sharmaparnika / Stop_n_Wait

Implementation of Stop and Wait Protocol

Home Page:https://github.com/sharmaparnika/Stop_n_Wait

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop n Wait Protocol

AIM: Implementation of Stop and Wait Protocol

ALGORITHM:

Sender:

Step1: sequence ß 0
Step2: Accept new packet and assign sequence to it.
Step3: Send packet sequence with sequence number sequence.
Step4: Set timer for recently sent packets.
Step5: If error free acknowledgment from receiver and NextFrameExpected -> sequence then sequence -> NextFrameExpected.
Step6: If time out then go to step3.
Step7: Stop.

Receiver:

Step1: Start.
Step2: NextFrameExpected <- 0, repeat steps 3 forever.
Step3: If error-free frame received and sequence= NextFrameExpected, then pass packet to higher layer and NextFrameExpected <- NextFrameExpected+1(modulo 2).
Step4: Stop.

Sender Snapshot:

image

Receiver Snapshot:

image


About

Implementation of Stop and Wait Protocol

https://github.com/sharmaparnika/Stop_n_Wait


Languages

Language:Java 100.0%