Skip to content

QuantumCc/Simple-Transport-Protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

APPROACHES: To start, I decided to use a dictionary to contain the packets for the receiver, this worked well since dictionary does not allow duplicate packets, every time an EOF true flag is encountered, packets in the dictionary would be printed according to their sequence number. For the sender I created two dictionaries each representing buffered packets and sent packets. Every time a message was sent, the message will be added to the buffered packets. If an ack is received, the message will pop from the buffered packets and to the sent packets. At the end, by comparing the difference of the two dictionaries, it's easy to find out which packets failed in sending, I then resend those packets. Once everything is sent, the receiver would receive an true EOF from sender, it then prints out all the messages.

About

TCP-like protocol on top of UDP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages