Directories
¶
| Path | Synopsis |
|---|---|
|
Package codec encodes and decodes WebSocket frames using byte slices.
|
Package codec encodes and decodes WebSocket frames using byte slices. |
|
Package deflate implements permessage-deflate.
|
Package deflate implements permessage-deflate. |
|
Package events serves connections through a Handler interface instead of a read loop: a thin layer over transport and ws.Serve.
|
Package events serves connections through a Handler interface instead of a read loop: a thin layer over transport and ws.Serve. |
|
examples
|
|
|
broadcast
command
Command broadcast runs a chat-style hub: every message a client sends is relayed to all connected clients.
|
Command broadcast runs a chat-style hub: every message a client sends is relayed to all connected clients. |
|
client
command
Command client talks to an echo server.
|
Command client talks to an echo server. |
|
echo
command
Command echo serves a WebSocket echo endpoint, the shape the Autobahn test suite expects: go run ./examples/echo, then point wstest at ws://host:9001.
|
Command echo serves a WebSocket echo endpoint, the shape the Autobahn test suite expects: go run ./examples/echo, then point wstest at ws://host:9001. |
|
echo-events
command
Command echo-events is the echo server as an events.Handler, the shape a gws handler takes: one method per event and no read loop of your own.
|
Command echo-events is the echo server as an events.Handler, the shape a gws handler takes: one method per event and no read loop of your own. |
|
echo-http
command
Command echo-http serves the echo endpoint from an http.Handler, for servers that already run on net/http: routes, middleware, or TLS through ListenAndServeTLS.
|
Command echo-http serves the echo endpoint from an http.Handler, for servers that already run on net/http: routes, middleware, or TLS through ListenAndServeTLS. |
|
echo-queue
command
Command echo-queue echoes through a Queue.
|
Command echo-queue echoes through a Queue. |
|
echo-stream
command
Command echo-stream echoes messages of any size in bounded memory.
|
Command echo-stream echoes messages of any size in bounded memory. |
|
tunnel
command
Command tunnel carries TCP connections over WebSockets, the way a WebSocket-only ingress or a browser-side proxy needs: NetConn turns a connection into a net.Conn, one message per Write, and io.Copy does the rest.
|
Command tunnel carries TCP connections over WebSockets, the way a WebSocket-only ingress or a browser-side proxy needs: NetConn turns a connection into a net.Conn, one message per Write, and io.Copy does the rest. |
|
Package handshake implements the WebSocket opening handshake rules without performing I/O: key and accept computation, request and response validation, permessage-deflate negotiation, and subprotocol selection.
|
Package handshake implements the WebSocket opening handshake rules without performing I/O: key and accept computation, request and response validation, permessage-deflate negotiation, and subprotocol selection. |
|
internal
|
|
|
utf8
Package utf8 validates UTF-8 faster than the standard library.
|
Package utf8 validates UTF-8 faster than the standard library. |
|
Package transport connects the WebSocket handshake to the network.
|
Package transport connects the WebSocket handshake to the network. |
|
Package ws provides message I/O over already-upgraded WebSocket connections.
|
Package ws provides message I/O over already-upgraded WebSocket connections. |
Click to show internal directories.
Click to hide internal directories.