Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMessageFactory ¶
type Message ¶
type Message struct { RouteType Type // 路由类型: 0-close,1-client,2-hall MessageType Type // 协议类型: 1-proto,2-json Verion uint32 // 协议版本 SeqID uint32 // 消息唯一ID,从0开始递增 Time int64 // 时间戳 MsgID uint16 // 协议ID Data []byte // 协议数据 ProtoData protoiface.MessageV1 }
Message represents a unmarshaled message or a message which to be marshaled
func NewMessage ¶
func NewMessage(routeType Type, messageType Type, verion uint32, seqID uint32, msgID uint16, protoData protoreflect.ProtoMessage) (this *Message)
func NewMessageDirect ¶ added in v1.0.3
func NewMessageWith ¶
func (*Message) GetSecurityType ¶
func (*Message) GetSerializeType ¶
type MessageFactory ¶
type MessageFactory struct { }
func NewMessageFactory ¶
func NewMessageFactory() (this *MessageFactory)
func (*MessageFactory) GetMessage ¶
func (factory *MessageFactory) GetMessage(buf []byte) (valid bool, ret protocol.IProtocol)
Click to show internal directories.
Click to hide internal directories.