Versions in this module Expand all Collapse all v0 v0.0.3 Jul 18, 2021 Changes in this version + const LightHandshakeSt + func EncodeHandshake(key, token, err []byte) []byte + type Handshake struct + Error []byte + Key []byte + Token []byte + func (h *Handshake) Handshake(r io.Reader) error v0.0.2 Jul 12, 2021 v0.0.1 Jul 11, 2021 Changes in this version + const HeadSize + const LightSt + var Crc32 = false + func EncodeMessage(magicStr string, server, method, metaData []byte, ...) (magic string, data []byte, err error) + type Header struct + CompressorType byte + Crc32 uint32 + MagicNumberSize uint32 + MetaDataSize uint32 + PayloadSize uint32 + RespType byte + SerializationType byte + ServerMethodSize uint32 + ServerNameSize uint32 + St byte + Version byte + func DecodeHeader(data []byte) (*Header, error) + type LightVersion byte + const V1 + type Message struct + Header *Header + MagicNumber string + MetaData []byte + Payload []byte + ServiceMethod string + ServiceName string + func DecodeMessage(data []byte) (*Message, error) + func DecodeMessageV2(data []byte, header *Header, headSize uint32) (*Message, error) + type Protocol struct + func NewProtocol() *Protocol + func (m *Protocol) IODecode(r io.Reader) (*Message, error) + type RequestType byte + const HeartBeat + const Request + const Response