ws

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWriteChanFull = errors.New("writeToClient chan full")
)

Functions

func CloseAndDelete

func CloseAndDelete(key string)

func LoadAllConn

func LoadAllConn() chan *WebsocketConn

Types

type WebsocketConn

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

func Get

func Get(key string) *WebsocketConn

func WrapWs

func WrapWs(ctx context.Context, c *websocket.Conn, uid types.ID) *WebsocketConn

func (*WebsocketConn) AddCloseAction

func (w *WebsocketConn) AddCloseAction(f func() error)

func (*WebsocketConn) AddPingAction

func (w *WebsocketConn) AddPingAction(f func() error)

func (*WebsocketConn) Close

func (w *WebsocketConn) Close() error

func (*WebsocketConn) Err

func (w *WebsocketConn) Err() error

func (*WebsocketConn) Key

func (w *WebsocketConn) Key() string

func (*WebsocketConn) Write

func (w *WebsocketConn) Write(data []byte) error

Jump to

Keyboard shortcuts

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