event

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ON_HAND_SHAKE = "handshake"
	ON_OPEN       = "open"
	ON_MESSAGE    = "message"
	ON_CLOSE      = "close"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OnClose

type OnClose = func(ser *websocket2.WsServer, code int, text string)

type OnHandshake

type OnHandshake = func(ser *websocket2.WsServer, upgrader *websocket.FastHTTPUpgrader)

type OnMessage

type OnMessage = func(ser *websocket2.WsServer, data []byte)

type OnOpen

type OnOpen = func(ser *websocket2.WsServer)

type Websocket

type Websocket interface {
	OnHandshake(ser *websocket2.WsServer, upgrader *websocket.FastHTTPUpgrader)
	OnOpen(ser *websocket2.WsServer)
	OnMessage(ser *websocket2.WsServer, data []byte)
	OnClose(ser *websocket2.WsServer, code int, text string)
}

Jump to

Keyboard shortcuts

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