websocketbase

package
v1.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL