Documentation ¶
Overview ¶
Package websocket provides web socket auto configuration for web/cli application
Index ¶
Constants ¶
View Source
const ( // Profile websocket profile name Profile = "websocket" // All is the string which the Emitter use to send a message to all. All = "" // Broadcast is the string which the Emitter use to send a message to all except this connection. Broadcast = ";to;all;except;me;" )
Variables ¶
This section is empty.
Functions ¶
func HandleConnection ¶
func HandleConnection(constructor HandlerConstructor, conn websocket.Connection)
Types ¶
type Connection ¶
type Connection interface { websocket.Connection }
Connection is the websocket connection
type ConnectionFunc ¶
type ConnectionFunc func(ctx context.Context) websocket.Connection
type HandlerConstructor ¶
type HandlerConstructor func(conn Connection) Handler
ConnectionFunc is the websocket connection function
type HandlerFunc ¶
type HandlerFunc func(ctx *web.Context, constructor HandlerConstructor) Connection
ConnectionFunc is the websocket connection function
Click to show internal directories.
Click to hide internal directories.