Skip to content

v0.5.0 — first-party WebSocket (ws://)

Choose a tag to compare

@Tuntii Tuntii released this 19 Jul 13:17

Viltrum v0.5.0

First-party RFC 6455 server on the v0.4 Conn / app.upgrade path. Cleartext ws:// only; wss:// is v0.6. Reverse proxy for TLS remains first-class.

WebSocket

  • viltrum.ws — own frame codec (text, binary, close, ping, pong); not a third-party wrapper
  • app.ws / app.ws_opts — one-line facade on the hijack foundation
  • Handshake: Upgrade: websocket, version 13, Sec-WebSocket-Accept (RFC golden vector tested)
  • Client mask required; server unmasked; fragmented data rejected (close 1002)
  • Message/frame size limits (default 1 MiB); auto-pong on; optional subprotocol + check_origin

Docs & example

  • docs/ws.md — API, options, out of scope
  • docs/deploy.md — nginx upgrade hop-by-hop sketch
  • examples/ws_echowebsocat ws://127.0.0.1:8084/ws

Tests

  • v test ws/ · existing http/ · router/ · engine/
  • CI builds ws_echo

Next

v0.6 — in-process TLS (https://) then WSS (wss://) on the same Conn + WS stack. Interest: interest:tls Collect in-process TLS / WSS use-cases; planned after WS (0.6)

Full notes: CHANGELOG.md · ROADMAP.md