Documentation ¶
Index ¶
- type WebsocketClientBase
- func (s *WebsocketClientBase) Conn() *websocket.Conn
- func (s *WebsocketClientBase) Connect(ctx context.Context) error
- func (s *WebsocketClientBase) EmitConnected(conn *websocket.Conn)
- func (s *WebsocketClientBase) EmitDisconnected(conn *websocket.Conn)
- func (s *WebsocketClientBase) EmitError(err error)
- func (s *WebsocketClientBase) EmitMessage(message []byte)
- func (s *WebsocketClientBase) Listen(ctx context.Context)
- func (s *WebsocketClientBase) OnConnected(cb func(conn *websocket.Conn))
- func (s *WebsocketClientBase) OnDisconnected(cb func(conn *websocket.Conn))
- func (s *WebsocketClientBase) OnError(cb func(err error))
- func (s *WebsocketClientBase) OnMessage(cb func(message []byte))
- func (s *WebsocketClientBase) Reconnect()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebsocketClientBase ¶
type WebsocketClientBase struct {
// contains filtered or unexported fields
}
WebsocketClientBase is a legacy base client Deprecated: please use standard stream instead.
func NewWebsocketClientBase ¶
func NewWebsocketClientBase(baseURL string, reconnectDuration time.Duration) *WebsocketClientBase
func (*WebsocketClientBase) Conn ¶
func (s *WebsocketClientBase) Conn() *websocket.Conn
func (*WebsocketClientBase) Connect ¶
func (s *WebsocketClientBase) Connect(ctx context.Context) error
func (*WebsocketClientBase) EmitConnected ¶
func (s *WebsocketClientBase) EmitConnected(conn *websocket.Conn)
func (*WebsocketClientBase) EmitDisconnected ¶
func (s *WebsocketClientBase) EmitDisconnected(conn *websocket.Conn)
func (*WebsocketClientBase) EmitError ¶
func (s *WebsocketClientBase) EmitError(err error)
func (*WebsocketClientBase) EmitMessage ¶
func (s *WebsocketClientBase) EmitMessage(message []byte)
func (*WebsocketClientBase) Listen ¶
func (s *WebsocketClientBase) Listen(ctx context.Context)
func (*WebsocketClientBase) OnConnected ¶
func (s *WebsocketClientBase) OnConnected(cb func(conn *websocket.Conn))
func (*WebsocketClientBase) OnDisconnected ¶
func (s *WebsocketClientBase) OnDisconnected(cb func(conn *websocket.Conn))
func (*WebsocketClientBase) OnError ¶
func (s *WebsocketClientBase) OnError(cb func(err error))
func (*WebsocketClientBase) OnMessage ¶
func (s *WebsocketClientBase) OnMessage(cb func(message []byte))
func (*WebsocketClientBase) Reconnect ¶
func (s *WebsocketClientBase) Reconnect()
Click to show internal directories.
Click to hide internal directories.