MCPcopy Create free account
hub / github.com/kataras/iris / SetupWebsockets

Method SetupWebsockets

_examples/bootstrapper/bootstrap/bootstrapper.go:57–61  ·  view source on GitHub ↗

SetupWebsockets prepares the websocket server.

(endpoint string, handler websocket.ConnHandler)

Source from the content-addressed store, hash-verified

55
56// SetupWebsockets prepares the websocket server.
57func (b *Bootstrapper) SetupWebsockets(endpoint string, handler websocket.ConnHandler) {
58 ws := websocket.New(websocket.DefaultGorillaUpgrader, handler)
59
60 b.Get(endpoint, websocket.Handler(ws))
61}
62
63// SetupErrorHandlers prepares the http error handlers
64// `(context.StatusCodeNotSuccessful`, which defaults to >=400 (but you can change it).

Callers

nothing calls this directly

Calls 3

HandlerFunction · 0.92
NewMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected