connection

package
v0.0.0-...-351850b Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 13 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,
	skipVerify bool,
	serverCertFilePath string) (*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