Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HashSize = 10
Functions ¶
This section is empty.
Types ¶
type CmdData ¶
type CmdData struct { Cmd string `json:"cmd"` Data interface{} `json:"data"` // obj Msg string `json:"msg"` Code int `json:"code"` Token string `json:"token"` }
func NewCmdData ¶
func NewCmdData() *CmdData
func (*CmdData) VerifyToken ¶
type TCPHeartBeatCache ¶
type TCPHeartBeatCache struct { }
func (*TCPHeartBeatCache) Add ¶
func (t *TCPHeartBeatCache) Add(token string)
func (*TCPHeartBeatCache) Del ¶
func (t *TCPHeartBeatCache) Del(token string)
func (*TCPHeartBeatCache) Has ¶
func (t *TCPHeartBeatCache) Has(token string) bool
type TcpClient ¶
type TcpHashTable ¶
func InitTcpConnTable ¶
func InitTcpConnTable() *TcpHashTable
func (*TcpHashTable) Del ¶
func (table *TcpHashTable) Del(value *TcpClient)
func (*TcpHashTable) Insert ¶
func (table *TcpHashTable) Insert(value *TcpClient)
type UdpClient ¶
type UdpHashTable ¶
func InitUdpConnTable ¶
func InitUdpConnTable() *UdpHashTable
func (*UdpHashTable) Del ¶
func (table *UdpHashTable) Del(value *UdpClient)
func (*UdpHashTable) Insert ¶
func (table *UdpHashTable) Insert(value *UdpClient)
type WsClient ¶
type WsHashTable ¶
func InitWsConnTable ¶
func InitWsConnTable() *WsHashTable
func (*WsHashTable) Del ¶
func (table *WsHashTable) Del(value *WsClient)
func (*WsHashTable) Insert ¶
func (table *WsHashTable) Insert(value *WsClient)
Click to show internal directories.
Click to hide internal directories.