Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IConnection ¶
type IConnection interface {
GetUuid() string
ReadMsg()
WriteMsg(message interface{})
Close() error
AfterClose(func())
// 设置自定义数据
SetData(interface{})
GetData() interface{}
// 设置节点
SetNode(INode)
GetNode() INode
// 是否关闭
IsClosed() bool
}
网络连接
type INode ¶
type INode interface {
AddConn(IConnection) error
DelConn(string) error
Serve()
OnRawMessage([]byte) error
OnProtocolMessage(interface{}) error
GetAllMessage() chan []interface{}
Destroy() error
Complete() error
}
网络同步节点,如游戏房间节点,聊天室节点
Click to show internal directories.
Click to hide internal directories.