34 lines
520 B
Go
34 lines
520 B
Go
|
|
package clientMgr
|
|||
|
|
|
|||
|
|
import . "common/model"
|
|||
|
|
|
|||
|
|
// IClient 客户端连接接口
|
|||
|
|
type IClient interface {
|
|||
|
|
// GetId 获取客户端对象的唯一标识
|
|||
|
|
GetId() int32
|
|||
|
|
|
|||
|
|
// 获取玩家Id
|
|||
|
|
GetPlayerId() int64
|
|||
|
|
|
|||
|
|
// 玩家登录
|
|||
|
|
PlayerLogin(int64)
|
|||
|
|
|
|||
|
|
// 发送数据
|
|||
|
|
SendMessage(*ServerResponseObject)
|
|||
|
|
|
|||
|
|
// 清空待发送数据
|
|||
|
|
ClearSendData()
|
|||
|
|
|
|||
|
|
// 客户端活跃
|
|||
|
|
Active()
|
|||
|
|
|
|||
|
|
// 获取远程地址(IP_Port)
|
|||
|
|
GetRemoteAddr() string
|
|||
|
|
|
|||
|
|
// 客户端连接超时
|
|||
|
|
Expired() bool
|
|||
|
|
|
|||
|
|
// 客户端连接对象断开
|
|||
|
|
Close()
|
|||
|
|
}
|