connection

package
v2.16.5 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const EOF string = "EOF"

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Connection represents wrapped and safe to use from the different threads websocket connection

func NewConnection

func NewConnection(wsConn net.Conn, log *zap.Logger) *Connection

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Read

func (c *Connection) Read() ([]byte, ws.OpCode, error)

func (*Connection) Write

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

Jump to

Keyboard shortcuts

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