Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebSocketClient ¶
type WebSocketClient struct {
// contains filtered or unexported fields
}
WebSocketClient defines websocket client object
func NewWebSocketClient ¶
func NewWebSocketClient(conf *WebSocketConfig) *WebSocketClient
NewWebSocketClient returns a new web socket client object with its configuration
func (*WebSocketClient) Init ¶
func (wcc *WebSocketClient) Init() error
Init initializes websocket client
func (*WebSocketClient) Notify ¶
func (wcc *WebSocketClient) Notify(authInfo map[string]string)
Notify logs info
func (*WebSocketClient) Receive ¶
func (wcc *WebSocketClient) Receive() (model.Message, error)
Receive reads the binary message through the connection
func (*WebSocketClient) Send ¶
func (wcc *WebSocketClient) Send(message model.Message) error
Send sends the message as binary message through the connection
func (*WebSocketClient) Uninit ¶
func (wcc *WebSocketClient) Uninit()
Uninit closes the web socket connection
Click to show internal directories.
Click to hide internal directories.