Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RPCClientList map[int8]client.XClient
RPCClientList is list of CometRPC
View Source
var ( // RedisCli is Client of redis RedisCli *redis.Client )
Functions ¶
Types ¶
type Operation ¶
type Operation int
Operation defines the type of operation.
const ( // OpSingleSend 指定用户发送 OpSingleSend Operation // OpRoomSend 广播到房间操作 OpRoomSend )
type Proto ¶
type Proto struct {
Ver int16 `json:"ver"` // protocol version
Operation Operation `json:"op"` // operation for request
Body json.RawMessage `json:"body"` // binary body bytes(json.RawMessage is []byte)
}
Proto is struct of msg protocol
type RedisMsg ¶
type RedisMsg struct {
Carrier []byte `json:"carrier"` // 携带trace信息
Op Operation `json:"op"`
ServerID int8 `json:"serverID,omitempty"`
RoomID string `json:"roomID,omitempty"`
UserID string `json:"userID,omitempty"`
Msg []byte `json:"msg"`
Count int `json:"count"`
RoomUserInfo map[string]string `json:"RoomUserInfo"`
}
RedisMsg is struct of RedisMsg
type RoomMsgArg ¶
RoomMsgArg is struct of room msg arg
type SuccessReply ¶
SuccessReply is struct of success reply
Click to show internal directories.
Click to hide internal directories.