Documentation ¶
Index ¶
- type Client
- func (c *Client) ConnectTo(addr string) error
- func (c *Client) ConnectToTLS(addr string, skipVerify bool) error
- func (c *Client) ConnectedStatus() bool
- func (c *Client) Disconnect()
- func (c *Client) MsgChannel() chan *cherryMessage.Message
- func (c *Client) SendNotify(route string, data []byte) error
- func (c *Client) SendRequest(route string, data []byte) (uint, error)
- type HandshakeData
- type HandshakeSys
- type IClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Connected bool IncomingMsgChan chan *cherryMessage.Message // contains filtered or unexported fields }
Client struct
func (*Client) ConnectTo ¶
ConnectTo connects to the server at addr, for now the only supported protocol is tcp this methods blocks as it also handles the messages from the server
func (*Client) ConnectToTLS ¶
ConnectToTLS connects to the server at addr using TLS, for now the only supported protocol is tcp this methods blocks as it also handles the messages from the server
func (*Client) ConnectedStatus ¶
ConnectedStatus return the connection status
func (*Client) MsgChannel ¶
func (c *Client) MsgChannel() chan *cherryMessage.Message
MsgChannel return the incoming message channel
func (*Client) SendNotify ¶
SendNotify sends a notify to the server
type HandshakeData ¶
type HandshakeData struct { Code int `json:"code"` Sys HandshakeSys `json:"sys"` }
HandshakeData struct
Click to show internal directories.
Click to hide internal directories.