Documentation
¶
Index ¶
- type Client
- func (c *Client) ConnectWithTimeOut(timeout int) (err error)
- func (client *Client) SendBuffMsg(msgID uint32, ctr byte, data []byte) error
- func (client *Client) SendMsg(msgID uint32, ctr byte, data []byte) error
- func (c *Client) SendTopicMsg(id uint32, msg *common.TopMessage) error
- func (c *Client) SendTopicMsgDirect(id uint32, msg *common.TopMessage) error
- func (c *Client) Start() error
- func (client *Client) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Exit chan struct{} Topic string Id uint32 //有缓冲管道,用于读、写两个goroutine之间的消息通信 In chan common.IMessage Packet common.Packet sync.RWMutex // contains filtered or unexported fields }
func (*Client) ConnectWithTimeOut ¶
func (*Client) SendBuffMsg ¶
SendBuffMsg 发生BuffMsg
func (*Client) SendTopicMsg ¶
func (c *Client) SendTopicMsg(id uint32, msg *common.TopMessage) error
func (*Client) SendTopicMsgDirect ¶
func (c *Client) SendTopicMsgDirect(id uint32, msg *common.TopMessage) error
Click to show internal directories.
Click to hide internal directories.