websocket

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContainer

func NewContainer(addr string, apps ...WebsocketApplication) scene.ApplicationContainer

Types

type WebsocketApplication

type WebsocketApplication interface {
	scene.Application
	Prefix() string
	Create(mux WebsocketMux) error
}

type WebsocketHandler

type WebsocketHandler func(conn *websocket.Conn, clos func()) WebsocketMessageHandler

type WebsocketMessageHandler

type WebsocketMessageHandler func(msgType int, msg []byte, err error) error

type WebsocketMux

type WebsocketMux interface {
	http.Handler
	HandleFunc(pattern string, handler WebsocketHandler)
	UsePrefix(pattern string) WebsocketMux
}

func NewWebSocketMux

func NewWebSocketMux() WebsocketMux

Jump to

Keyboard shortcuts

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