client

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection added in v1.2.2

type Connection struct {
	Name string
	Conn websocketIO
}

func NewConnection

func NewConnection(d Dialer, secure bool, name, host, path, token string, query string) (*Connection, error)

creates new Connection

func (*Connection) Read added in v1.2.2

func (c *Connection) Read(ctx context.Context, msgCh chan []byte)

read loop for wesocket

func (*Connection) Write added in v1.2.2

func (c *Connection) Write(b []byte) error

write to websocket

type Dialer added in v1.2.2

type Dialer interface {
	Dial(urlStr string, requestHeader http.Header) (*websocket.Conn, *http.Response, error)
}

Jump to

Keyboard shortcuts

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