gorillawrapper

package module
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: GPL-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 Connection

type Connection struct {

	// CloseTimeout is the amount of time to wait after sending a closure status.
	CloseTimeout time.Duration
	// contains filtered or unexported fields
}

Connection is a wrapper around a gorilla connection that conforms to websocket.Connection interface and can be used in gateways.

func New

func New(conn *websocket.Conn) Connection

New creates a new Connection instance with a valid gorilla connection.

func (Connection) Close

func (c Connection) Close() error

func (Connection) ReceiveMessage

func (c Connection) ReceiveMessage() ([]byte, error)

func (Connection) SendClose

func (c Connection) SendClose() error

func (Connection) SendMessage

func (c Connection) SendMessage(data []byte) error

Jump to

Keyboard shortcuts

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