https://github.com/yankeguo-deprecated/sptp-cd037cd7
MIGRATED TO go-guoyk/sptp
https://github.com/yankeguo-deprecated/sptp-cd037cd7
Last synced: about 2 months ago
JSON representation
MIGRATED TO go-guoyk/sptp
- Host: GitHub
- URL: https://github.com/yankeguo-deprecated/sptp-cd037cd7
- Owner: yankeguo-deprecated
- License: mit
- Created: 2019-03-25T09:20:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-26T05:41:11.000Z (about 6 years ago)
- Last Synced: 2025-02-14T16:58:30.063Z (3 months ago)
- Language: Go
- Homepage: https://go.guoyk.net/sptp
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SPTP
[](https://travis-ci.org/yankeguo/sptp)
Simple Payload Transmission Protocol
We assume protocol is handled via internal networking, thus UDP can be considered as a reliable transport.
The only problem is UDP packet size limitation, we solve this by chunk reassembling with unique message id.
## Packet Format
binary format, little-endian
* 1 byte, magic number, `0xAF`
* 1 byte, mode
* bit 0, 1 = chunked message, 0 = simple message
* bit 1, 1 = gzipped, 0 = plain
* (for chunked message only), 10 bytes, chunks info
* 8 byte (uint64), unique message id, random generated
* 1 byte, total chunk count
* 1 byte, current chunk index
* n bytes, (segmented) payload## Credit
Yanke Guo, MIT license