websocket

package
v0.0.0-...-8967c3b Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

type Hub struct {

	// Capacity of the send channel.
	// If capacity is 0, the send channel is unbuffered.
	Capacity uint
	// contains filtered or unexported fields
}

func NewHub

func NewHub(cap uint) *Hub

NewClient instantiates a new websocket client.

NOTE: these may be useful to set: Capacity, ReadBufferSize, ReadTimeout, WriteTimeout

func (*Hub) Close

func (cli *Hub) Close() error

TODO -- should be able to close all connections via their own channels

func (*Hub) Len

func (cli *Hub) Len() int

Len returns the number of connections.

func (*Hub) ServeHTTP

func (cli *Hub) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TransportHandler

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

using websocket for now, will be switching to Quic and WebTransport later

Jump to

Keyboard shortcuts

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