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 a websocket client
func NewWebSocketClient ¶
func NewWebSocketClient(conf *WebSocketConfig) *WebSocketClient
NewWebSocketClient initializes a new websocket client instance
func (*WebSocketClient) Init ¶
func (wsc *WebSocketClient) Init() error
Init initializes websocket client
func (*WebSocketClient) Notify ¶
func (wsc *WebSocketClient) Notify(authInfo map[string]string)
Notify logs info
func (*WebSocketClient) Receive ¶
func (wsc *WebSocketClient) Receive() (model.Message, error)
Receive reads the binary message through the connection
func (*WebSocketClient) Send ¶
func (wsc *WebSocketClient) Send(message model.Message) error
Send sends the message as JSON object through the connection
func (*WebSocketClient) UnInit ¶ added in v1.6.1
func (wsc *WebSocketClient) UnInit()
UnInit closes the websocket connection
Click to show internal directories.
Click to hide internal directories.