Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HookEvent ¶
type HookEvent struct { EventType string // 事件类型 online / offline / message User *serverUser Message UDataSocket }
type Server ¶
type Server struct { ClientHeartTimeOut int // 客户端超时时间 默认60秒 OnHookEvent func(Msg HookEvent) // hook回调消息 ChanHookEvent chan *HookEvent // 所有消息,各个子连接传过来的 SendFlag int // socket验证标记 // contains filtered or unexported fields }
1、结构体 -------------------------------------------------------------------------
type UDataSocket ¶
type UDataSocket struct { CType int // 内容类型 1:客户端请求消息 2:服务端表接口消息 4:服务端表内容数据 200:服务端发送结束 Content []byte // 发送内容 }
结构体1:传输数据上层结构体
Click to show internal directories.
Click to hide internal directories.