Documentation ¶
Index ¶
- func AfterFunc(qid int, d time.Duration, f func()) *time.Timer
- func GetQidByKey(key string) int
- func InitAuthMessage(authMessage interface{})
- func Post(qid int, f func())
- func PostAsync(qid int, f func() interface{}, cb func(ret interface{}))
- func PostSync(qid int, f func() interface{}) interface{}
- func RegisterMessage(msg interface{}, f func(ev cellnetEx.Event))
- func RegisterObjMessge(player interface{})
- func RegitserPlayerPBMessage(player interface{})
- type BaseCell
- func (bcell *BaseCell) AfterFunc(qid int, d time.Duration, f func()) *time.Timer
- func (bcell *BaseCell) GetQidByKey(key string) int
- func (bcell *BaseCell) InitAuthMessage(authMessage interface{})
- func (bcell *BaseCell) NewWsClient(addr string)
- func (bcell *BaseCell) NewWsServer(addr string)
- func (bcell *BaseCell) Post(qid int, f func())
- func (bcell *BaseCell) PostAsync(qid int, f func() interface{}, cb func(ret interface{}))
- func (bcell *BaseCell) PostSync(qid int, f func() interface{}) interface{}
- func (bcell *BaseCell) RegisterMessage(msg interface{}, f func(ev cellnetEx.Event))
- func (bcell *BaseCell) RegisterObjMessge(obj interface{})
- func (bcell *BaseCell) RegitserPlayerPBMessage(player interface{})
- func (bcell *BaseCell) Start(mods ...IModule)
- func (bcell *BaseCell) Stop()
- type IModule
- type IUserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PostAsync ¶
func PostAsync(qid int, f func() interface{}, cb func(ret interface{}))
PostAsync 异步调用
func RegisterMessage ¶
RegisterMessage 注册默认消息响应
func RegitserPlayerPBMessage ¶
func RegitserPlayerPBMessage(player interface{})
RegitserPlayerPBMessage 注册默认消息响应
Types ¶
type BaseCell ¶
type BaseCell struct { MsgQueueLen int // contains filtered or unexported fields }
BaseCell 基础服务
func (*BaseCell) InitAuthMessage ¶
func (bcell *BaseCell) InitAuthMessage(authMessage interface{})
初始化认证信息 应该是客户端发的第一个消息
func (*BaseCell) RegisterMessage ¶
RegisterMessage 注册消息回调
func (*BaseCell) RegisterObjMessge ¶
func (bcell *BaseCell) RegisterObjMessge(obj interface{})
RegisterObjMessge 注册玩家下对象处理的消息
func (*BaseCell) RegitserPlayerPBMessage ¶
func (bcell *BaseCell) RegitserPlayerPBMessage(player interface{})
RegitserPlayerPBMessage 注册玩家处理的消息
Click to show internal directories.
Click to hide internal directories.