Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakkusakura/comp4621-protocol
An application-level reliable network protocol upon UDP, a final project of COMP4721
https://github.com/jakkusakura/comp4621-protocol
Last synced: 13 days ago
JSON representation
An application-level reliable network protocol upon UDP, a final project of COMP4721
- Host: GitHub
- URL: https://github.com/jakkusakura/comp4621-protocol
- Owner: JakkuSakura
- License: mit
- Created: 2020-09-10T06:32:35.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-06T14:32:45.000Z (about 4 years ago)
- Last Synced: 2023-11-25T05:21:23.471Z (about 1 year ago)
- Language: Python
- Size: 654 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# COMP4621-Protocol
An application-level reliable network protocol upon UDP, a final project of COMP4721
## Functionalities
- Reliable data transfer(both sender side and receiver side): resistant to disordering, packet loss and corruption.
- Batch ACK
- Basic timeout and retransmit
- 0RTT Handshaking## Protocol
### Data Types
`int` 4 bytes, big endian
`data` 4 + n bytes, first 4 byte is its pure data length### Packets
Packet
```
int seq_num
int ack_num
int chk_sum
data payload
```
## Architecture
- adaptors.py: interface `Socket` and its implementations like `DebugSocket`(prints received and sent data), `DropoutSocket`(drops packets randomly), `CorruptedSocket`(shuffles individual packets probabilistically), `ArraySocket`(for manually construct packets), `DisorderSocket`(shuffle packets probabilistically), and **`UdtAdaptor`(utilizes udt.py here)**
- tools.py: some tools, including `ByteBuf` and `print_info`(print with mutex for testing)
- packet.py: packet format
- protocol.py: core code is implemented here. It should be rdt.py but I finished it before rdt.py template was released. I am too lazy to rename it.
- receiver.py
- sender.py
- udt.py