Registry / networking / fasthttp-websocket

fasthttp-websocket

JSON →
library1.5.12gogounverified

Package websocket implements the WebSocket protocol defined in RFC 6455 for use with the fasthttp HTTP server.

go get github.com/fasthttp/websocket
INSTALL
IMPORT
SIG · FASTHTTP-WEBSOCKET
F
fasthttp-websocket
networkinggov1.5.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

websocket
github.com/fasthttp/websocket

WebSocket echo server using fasthttp

package main import ( "log" "github.com/fasthttp/websocket" "github.com/valyala/fasthttp" ) var upgrader = websocket.FastHTTPUpgrader{} func main() { requestHandler := func(ctx *fasthttp.RequestCtx) { err := upgrader.Upgrade(ctx, func(conn *websocket.Conn) { for { msgType, msg, err := conn.ReadMessage() if err != nil { return } if err := conn.WriteMessage(msgType, msg); err != nil { return } } }) if err != nil { log.Print(err) } } fasthttp.ListenAndServe(":8080", requestHandler) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.5.12latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
fasthttp-websocket — go get fasthttp-websocket · libregistry