websocket

package
v0.0.0-...-564de18 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Handler start
	Connect() error

	// Handler closure
	Close()

	// An incoming message sink
	Incoming([]byte) error

	// A channel for outgoing messages
	Outgoing() (<-chan []byte, error)

	// Basically a passthru to outer ctx.Done()
	Done() <-chan struct{}
}

type Websocket

type Websocket struct {
	// the websocket connection
	*websocket.Conn
	// contains filtered or unexported fields
}

func New

func New() *Websocket

func (*Websocket) Open

func (ws *Websocket) Open(ctx context.Context, w http.ResponseWriter, r *http.Request, handler Handler) error

Jump to

Keyboard shortcuts

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