wstransport

package
v1.0.6-dev-10 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLRUCacheItems int = 100
)
View Source
const (
	WebsocketRoutePath = "/memberlist"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type WsTransport

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

func NewWsTransport

func NewWsTransport(logger smudge.Logger, remoteWsServerPort *int, wsBasePath string) (*WsTransport, error)

func (*WsTransport) AllowMulticast

func (wst *WsTransport) AllowMulticast() bool

func (*WsTransport) Dial

func (*WsTransport) Listen

func (wst *WsTransport) Listen(network string, addr transport.SockAddr) (transport.GenericConn, error)

func (*WsTransport) Network

func (wst *WsTransport) Network() string

Return network, udp, websockets, tcp, ipv4, etc.

func (*WsTransport) ResolveAddr

func (wst *WsTransport) ResolveAddr(network string, addr string) (transport.SockAddr, error)

func (*WsTransport) UpgageWebsocket

func (wst *WsTransport) UpgageWebsocket(w http.ResponseWriter, r *http.Request) error

UpgageWebsocket upgrade http request to websocket connection. Pass it to web server handler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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