Documentation ¶
Index ¶
- Constants
- type WebsocketClient
- func (c *WebsocketClient) Conn() *websocket.Conn
- func (c *WebsocketClient) Connect()
- func (c *WebsocketClient) ConnectChan() chan bool
- func (c *WebsocketClient) ConnectOnce() error
- func (c *WebsocketClient) Disconnect() error
- func (c *WebsocketClient) ErrorChan() chan error
- func (c *WebsocketClient) Recv(data interface{}, timeout uint) error
- func (c *WebsocketClient) RecvChan() chan *proto.Cmd
- func (c *WebsocketClient) Send(data interface{}, timeout uint) error
- func (c *WebsocketClient) SendBytes(data []byte) error
- func (c *WebsocketClient) SendChan() chan *proto.Reply
- func (c *WebsocketClient) Start()
- func (c *WebsocketClient) Status() map[string]string
- func (c *WebsocketClient) Stop()
Constants ¶
View Source
const ( SEND_BUFFER_SIZE = 10 RECV_BUFFER_SIZE = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebsocketClient ¶
type WebsocketClient struct {
// contains filtered or unexported fields
}
func NewWebsocketClient ¶
func NewWebsocketClient(logger *pct.Logger, api pct.APIConnector, link string) (*WebsocketClient, error)
func (*WebsocketClient) Conn ¶
func (c *WebsocketClient) Conn() *websocket.Conn
func (*WebsocketClient) Connect ¶
func (c *WebsocketClient) Connect()
func (*WebsocketClient) ConnectChan ¶
func (c *WebsocketClient) ConnectChan() chan bool
func (*WebsocketClient) ConnectOnce ¶
func (c *WebsocketClient) ConnectOnce() error
func (*WebsocketClient) Disconnect ¶
func (c *WebsocketClient) Disconnect() error
func (*WebsocketClient) ErrorChan ¶
func (c *WebsocketClient) ErrorChan() chan error
func (*WebsocketClient) Recv ¶
func (c *WebsocketClient) Recv(data interface{}, timeout uint) error
func (*WebsocketClient) RecvChan ¶
func (c *WebsocketClient) RecvChan() chan *proto.Cmd
func (*WebsocketClient) Send ¶
func (c *WebsocketClient) Send(data interface{}, timeout uint) error
func (*WebsocketClient) SendBytes ¶
func (c *WebsocketClient) SendBytes(data []byte) error
func (*WebsocketClient) SendChan ¶
func (c *WebsocketClient) SendChan() chan *proto.Reply
func (*WebsocketClient) Start ¶
func (c *WebsocketClient) Start()
func (*WebsocketClient) Status ¶
func (c *WebsocketClient) Status() map[string]string
func (*WebsocketClient) Stop ¶
func (c *WebsocketClient) Stop()
Click to show internal directories.
Click to hide internal directories.