message

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_REQUEST  = iota
	TYPE_NOTIFY   //1
	TYPE_RESPONSE //2
	TYPE_PUSH     //3

	MSG_FLAG_BYTES          = 1
	MSG_ROUTE_CODE_BYTES    = 2
	MSG_ROUTE_CODE_MAX      = 0xffff
	MSG_COMPRESS_ROUTE_MASK = 0x1
	MSG_TYPE_MASK           = 0x7
)

Variables

This section is empty.

Functions

func Decode

func Decode(buffer []byte) (id int, msgType int, route uint16, body []byte)

Message protocol decode.

func Encode

func Encode(id int, msgType int, route uint16, msg []byte) []byte

Message protocol encode.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL