Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yankeguo-deprecated/sptp-alt
UDP protocol for arbitrary large data
https://github.com/yankeguo-deprecated/sptp-alt
go golang golang-library protocol udp
Last synced: about 16 hours ago
JSON representation
UDP protocol for arbitrary large data
- Host: GitHub
- URL: https://github.com/yankeguo-deprecated/sptp-alt
- Owner: yankeguo-deprecated
- License: mit
- Created: 2019-07-04T06:08:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-17T08:40:46.000Z (over 5 years ago)
- Last Synced: 2024-05-09T03:49:19.786Z (9 months ago)
- Topics: go, golang, golang-library, protocol, udp
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SPTP
[![Build Status](https://travis-ci.org/go-guoyk/sptp.svg?branch=master)](https://travis-ci.org/go-guoyk/sptp)
[![Go Report Card](https://goreportcard.com/badge/go.guoyk.net/sptp)](https://goreportcard.com/report/go.guoyk.net/sptp)
![GitHub](https://img.shields.io/github/license/go-guoyk/sptp.svg)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
Guo Y.K., MIT License