nodemgr

package
v0.0.0-...-96491ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mgr

type Mgr struct {
	*nodecommon.Node
	// contains filtered or unexported fields
}

Mgr : 管理节点

func NewMgr

func NewMgr(ctx *common.Context) *Mgr

NewMgr : 管理节点实现类的构造函数

func (*Mgr) Close

func (mgr *Mgr) Close()

Close : 关闭组件

func (*Mgr) Start

func (mgr *Mgr) Start() bool

Start : 实例化组件

type Session

type Session struct {
	*nodecommon.SessionBase
}

Session : 网络会话类

func (*Session) DoClose

func (sess *Session) DoClose(sessbase *nodecommon.SessionBase)

DoClose : 节点关闭时处理

func (*Session) DoLose

func (sess *Session) DoLose(msg *protocol.MSG_MGR_LOSE_SERVER)

DoLose : 节点丢失时处理

func (*Session) DoRecv

func (sess *Session) DoRecv(cmd uint64, data []byte, flag byte) (done bool)

DoRecv : 节点收到消息处理

func (*Session) DoRegister

func (sess *Session) DoRegister(msg *protocol.MSG_MGR_REGISTER_SERVER)

DoRegister : 某节点注册时处理

func (*Session) DoVerify

func (sess *Session) DoVerify(msg *protocol.MSG_MGR_REGISTER_SERVER)

DoVerify : 验证时保存自己的注册消息

func (*Session) Init

func (sess *Session) Init(root context.Context, conn net.Conn, derived gotcp.ISession, userdata interface{})

Init : 初始化网络会话节点

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL