Package Usage: go: nhooyr.io/websocket
Package websocket implements the RFC 6455 WebSocket protocol.
Deprecated: coder now maintains this library at https://github.com/coder/websocket.
https://tools.ietf.org/html/rfc6455
Use Dial to dial a WebSocket server.
Use Accept to accept a WebSocket client.
Conn represents the resulting WebSocket connection.
The examples are the best way to understand how to correctly use the library.
The wsjson subpackage contain helpers for JSON and protobuf messages.
More documentation at https://nhooyr.io/websocket.
The client side supports compiling to Wasm.
It wraps the WebSocket browser API.
See https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
Some important caveats to be aware of:
This example demonstrates a echo server.
This example demonstrates full stack chat with an automated test.
43 versions
Latest release: over 1 year ago
4,855 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/nhooyr.io/websocket