websocket

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidToken = errors.New("invalid token")

Functions

This section is empty.

Types

type IncomingMessage

type IncomingMessage struct {
	Type  string          `json:"type"`
	Value json.RawMessage `json:"value"`
}

type Websocket

type Websocket struct {
	// contains filtered or unexported fields
}

func New

func New(wsURL string) *Websocket

func (*Websocket) Auth

func (w *Websocket) Auth(token string, timeout time.Duration) error

func (*Websocket) Close

func (w *Websocket) Close() error

func (*Websocket) Connect

func (w *Websocket) Connect(handshakeTimeout time.Duration) error

func (*Websocket) Recv

func (w *Websocket) Recv(timeout time.Duration) (msg IncomingMessage, err error)

Jump to

Keyboard shortcuts

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