Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ChunkedMTU payload size for a single message
ChunkedMTU = 16300
)
Variables ¶
This section is empty.
Functions ¶
func RandomToken ¶
func RandomToken() string
Types ¶
type ChunckedData ¶
type ChunckedData struct {
PeerData int `json:"__peerData"`
N int `json:"n"`
Total int `json:"total"`
Data []byte `json:"data"`
}
ChunckedData wraps a data slice with metadata to assemble back the whole data
func Chunk ¶
func Chunk(raw []byte) (chunks []ChunckedData)
Chunk slices a data payload in a list of ChunckedData
Click to show internal directories.
Click to hide internal directories.