-
The link emulator must be invoked first. (Not provided here. Any sniffer can be used)
-
The Receiver must be invoked first in the following form:
-
The receiver waits for the sender to start sending.
-
The sender must be invoked as: <ack_port_num>
-
Here, remote IP and remote port must be of the link emulator.
-
ack_port_num must be the port to which the sender binds
-
When the receiver detects corrupted data, it transmits the previous ack to indicate to the sender that the packet is corrupted.
-
The timer is placed on the receiver end since the packets could be lost only on the way to the receiver (since the acks are sent over tcp). If the receiver doesn't receive until timeout value, it transmits the previous ack to indicate the sender to retransmit. Similarly, it handles packet delay.
-
The receiver temporarily stores the packet and checks if the new packet is the same as the old. If that is the case, it rejects the new packet and transmits the previous ack to indicate the sender to retransmit data.
-
Logs of the required values are maintained in strings on both ends and is finally written on a file.
-
Notifications
You must be signed in to change notification settings - Fork 0
adarsh-murthy/TCP-protocol
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published