Documentation ¶
Index ¶
Constants ¶
View Source
const ( RecordTypeAll uint32 = 0 RecordTypeFriend uint32 = 1 RecordTypeLevel uint32 = 2 RecordTypeCompetition uint32 = 4 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct { Name string `json:"name"` RequestMessage proto.Message `json:"request_message,omitempty"` ResponseMessage proto.Message `json:"response_message,omitempty"` NotifyMessage proto.Message `json:"notify_message,omitempty"` }
若 NotifyMessage 不为空,这该消息为通知,RequestMessage 和 ResponseMessage 字段为空 否则该消息为请求响应,NotifyMessage 字段为空
type MessageReceiver ¶
type MessageReceiver struct {
// contains filtered or unexported fields
}
func NewMessageReceiver ¶
func NewMessageReceiver() *MessageReceiver
func (*MessageReceiver) Get ¶
func (mr *MessageReceiver) Get() *Message
func (*MessageReceiver) Put ¶
func (mr *MessageReceiver) Put(data []byte)
Click to show internal directories.
Click to hide internal directories.