connection

package
v0.0.0-...-f015300 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

func NewConnection

func NewConnection(u url.URL,
	token string,
	writeWait time.Duration,
	maxMessageSize int64,
	defaultPingWait time.Duration) (*Connection, error)

Websocket connection routine. setup the ping-pong and connection settings

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) GetWriteTimeout

func (c *Connection) GetWriteTimeout() time.Duration

func (*Connection) ReadMessage

func (c *Connection) ReadMessage() (*ws.ProtoMsg, error)

func (*Connection) WriteMessage

func (c *Connection) WriteMessage(m *ws.ProtoMsg) (err error)

Jump to

Keyboard shortcuts

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