Documentation ¶
Index ¶
- type Client
- type KcpModule
- func (km *KcpModule) Close(clientId string)
- func (km *KcpModule) GetClientIp(clientId string) string
- func (km *KcpModule) GetProcessor() processor.IRawProcessor
- func (km *KcpModule) Init(kcpCfg *network.KcpCfg, process processor.IRawProcessor)
- func (km *KcpModule) NewAgent(conn network.Conn) network.Agent
- func (km *KcpModule) OnClose(c *Client)
- func (km *KcpModule) OnConnected(c *Client)
- func (km *KcpModule) OnInit() error
- func (km *KcpModule) SendRawMsg(clientId string, data []byte) error
- func (km *KcpModule) SetBlob(blockCrypt kcp.BlockCrypt)
- func (km *KcpModule) Start() error
- type KcpPack
- type KcpPackType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KcpModule ¶
func (*KcpModule) GetClientIp ¶
func (*KcpModule) GetProcessor ¶
func (km *KcpModule) GetProcessor() processor.IRawProcessor
func (*KcpModule) Init ¶
func (km *KcpModule) Init(kcpCfg *network.KcpCfg, process processor.IRawProcessor)
func (*KcpModule) OnConnected ¶
type KcpPack ¶
type KcpPack struct { Type KcpPackType //0表示连接 1表示断开 2表示数据 ClientId string Data interface{} RecyclerReaderBytes func(data []byte) }
type KcpPackType ¶
type KcpPackType int8
const ( KPTConnected KcpPackType = 0 KPTDisConnected KcpPackType = 1 KPTPack KcpPackType = 2 KPTUnknownPack KcpPackType = 3 )
Click to show internal directories.
Click to hide internal directories.