Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncClient ¶
type AsyncClient struct { Ip string Port int HeartBeatRspTs int64 //上次收到心跳回复的时间戳,两个G使用,故原子操作 // contains filtered or unexported fields }
func CreateAsyncClient ¶
func CreateAsyncClient(ip string, port int, enableHeartBeat bool) *AsyncClient
创建一个client结构体
func (*AsyncClient) RegHandler ¶
func (c *AsyncClient) RegHandler(cmdId uint, handler MsgHandler)
设置消息ID对应的回调
type SyncClient ¶
func CreateSyncClient ¶
func CreateSyncClient(ip string, port int) (*SyncClient, error)
创建一个client结构体并连接
Click to show internal directories.
Click to hide internal directories.