Documentation ¶
Index ¶
- type Client
- func (client *Client) AddListener(handler func(interface{})) int
- func (client *Client) ClearListeners()
- func (client *Client) Close() error
- func (client *Client) Connect() error
- func (client *Client) IsConnected() bool
- func (client *Client) Reconnect()
- func (client *Client) RemoveListener(index int)
- func (client *Client) Send(payload interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Address *string Query *string Conn *websocket.Conn Listeners *[]func(interface{}) // contains filtered or unexported fields }
Client for forex api instance
func (*Client) AddListener ¶
AddListener : add the new listerer function and return total listeners amount
func (*Client) ClearListeners ¶
func (client *Client) ClearListeners()
ClearListeners : clean all listeners function
func (*Client) IsConnected ¶
IsConnected : check the websocket connection exists
func (*Client) RemoveListener ¶
RemoveListener : remove existing listerer function
Click to show internal directories.
Click to hide internal directories.