Versions in this module Expand all Collapse all v2 v2.1.0 Dec 11, 2025 Changes in this version + const MsgTypeSize + const RawMsgTypeSize + type ConnectHandler func(clientId string) + type ConnectJsonHandler func(clientId string) + type IProcessor interface + ConnectedRoute func(clientId string) + DisConnectedRoute func(clientId string) + Marshal func(clientId string, msg interface{}) ([]byte, error) + MsgRoute func(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) error + UnknownMsgRoute func(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) + Unmarshal func(clientId string, data []byte) (interface{}, error) + type IRawProcessor interface + MakeRawMsg func(msgType uint16, msg []byte, pbRawPackInfo *PBRawPackInfo) + SetByteOrder func(littleEndian bool) + SetConnectedHandler func(connectHandler RawConnectHandler) + SetDisConnectedHandler func(disconnectHandler RawConnectHandler) + SetRawMsgHandler func(handle RawMessageHandler) + SetUnknownMsgHandler func(unknownMessageHandler UnknownRawMessageHandler) + type JsonPackInfo struct + func (slf *JsonPackInfo) GetMsg() interface{} + func (slf *JsonPackInfo) GetPackType() uint16 + type JsonProcessor struct + LittleEndian bool + func NewJsonProcessor() *JsonProcessor + func (jsonProcessor *JsonProcessor) ConnectedRoute(clientId string) + func (jsonProcessor *JsonProcessor) DisConnectedRoute(clientId string) + func (jsonProcessor *JsonProcessor) MakeMsg(msgType uint16, msg interface{}) *JsonPackInfo + func (jsonProcessor *JsonProcessor) MakeRawMsg(msgType uint16, msg []byte) *JsonPackInfo + func (jsonProcessor *JsonProcessor) Marshal(clientId string, msg interface{}) ([]byte, error) + func (jsonProcessor *JsonProcessor) MsgRoute(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) error + func (jsonProcessor *JsonProcessor) Register(msgType uint16, msg interface{}, handle MessageJsonHandler) + func (jsonProcessor *JsonProcessor) RegisterConnected(connectHandler ConnectJsonHandler) + func (jsonProcessor *JsonProcessor) RegisterDisConnected(disconnectHandler ConnectJsonHandler) + func (jsonProcessor *JsonProcessor) RegisterUnknownMsg(unknownMessageHandler UnknownMessageJsonHandler) + func (jsonProcessor *JsonProcessor) SetByteOrder(littleEndian bool) + func (jsonProcessor *JsonProcessor) UnknownMsgRoute(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) + func (jsonProcessor *JsonProcessor) Unmarshal(clientId string, data []byte) (interface{}, error) + type MessageHandler func(clientId string, msg proto.Message) + type MessageInfo struct + type MessageJsonHandler func(clientId string, msg interface{}) + type MessageJsonInfo struct + type PBPackInfo struct + func (slf *PBPackInfo) GetMsg() proto.Message + func (slf *PBPackInfo) GetPackType() uint16 + type PBProcessor struct + LittleEndian bool + func NewPBProcessor() *PBProcessor + func (pbProcessor *PBProcessor) ConnectedRoute(clientId string) + func (pbProcessor *PBProcessor) DisConnectedRoute(clientId string) + func (pbProcessor *PBProcessor) MakeMsg(msgType uint16, protoMsg proto.Message) *PBPackInfo + func (pbProcessor *PBProcessor) MakeRawMsg(msgType uint16, msg []byte) *PBPackInfo + func (pbProcessor *PBProcessor) Marshal(clientId string, msg interface{}) ([]byte, error) + func (pbProcessor *PBProcessor) MsgRoute(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) error + func (pbProcessor *PBProcessor) Register(msgType uint16, msg proto.Message, handle MessageHandler) + func (pbProcessor *PBProcessor) RegisterConnected(connectHandler ConnectHandler) + func (pbProcessor *PBProcessor) RegisterDisConnected(disconnectHandler ConnectHandler) + func (pbProcessor *PBProcessor) RegisterUnknownMsg(unknownMessageHandler UnknownMessageHandler) + func (pbProcessor *PBProcessor) SetByteOrder(littleEndian bool) + func (pbProcessor *PBProcessor) UnknownMsgRoute(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) + func (pbProcessor *PBProcessor) Unmarshal(clientId string, data []byte) (interface{}, error) + func (pbProcessor *PBProcessor) UnmarshalWithOutRelease(clientId string, data []byte) (interface{}, error) + type PBRawPackInfo struct + func (slf *PBRawPackInfo) GetMsg() []byte + func (slf *PBRawPackInfo) GetPackType() uint16 + func (slf *PBRawPackInfo) SetPackInfo(typ uint16, rawMsg []byte) + type PBRawProcessor struct + LittleEndian bool + func NewPBRawProcessor() *PBRawProcessor + func (pbRawProcessor *PBRawProcessor) ConnectedRoute(clientId string) + func (pbRawProcessor *PBRawProcessor) DisConnectedRoute(clientId string) + func (pbRawProcessor *PBRawProcessor) MakeRawMsg(msgType uint16, msg []byte, pbRawPackInfo *PBRawPackInfo) + func (pbRawProcessor *PBRawProcessor) Marshal(clientId string, msg interface{}) ([]byte, error) + func (pbRawProcessor *PBRawProcessor) MsgRoute(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) error + func (pbRawProcessor *PBRawProcessor) SetByteOrder(littleEndian bool) + func (pbRawProcessor *PBRawProcessor) SetConnectedHandler(connectHandler RawConnectHandler) + func (pbRawProcessor *PBRawProcessor) SetDisConnectedHandler(disconnectHandler RawConnectHandler) + func (pbRawProcessor *PBRawProcessor) SetRawMsgHandler(handle RawMessageHandler) + func (pbRawProcessor *PBRawProcessor) SetUnknownMsgHandler(unknownMessageHandler UnknownRawMessageHandler) + func (pbRawProcessor *PBRawProcessor) UnknownMsgRoute(clientId string, msg interface{}, recyclerReaderBytes func(data []byte)) + func (pbRawProcessor *PBRawProcessor) Unmarshal(clientId string, data []byte) (interface{}, error) + type RawConnectHandler func(clientId string) + type RawMessageHandler func(clientId string, packType uint16, msg []byte) + type RawMessageInfo struct + type UnknownMessageHandler func(clientId string, msg []byte) + type UnknownMessageJsonHandler func(clientId string, msg []byte) + type UnknownRawMessageHandler func(clientId string, msg []byte)