Document WebSocket support

Merged
KL
3mo ago
+196-0

Documents the native WebSocket support added in #1042, following the same structure as the SSE docs (#1050):

  • New docs/websockets.md guide covering opening sessions, sending/receiving messages, subprotocols, keepalive pings, configuration, error handling, and testing ASGI applications with ASGIWebSocketTransport.
  • WebSockets entry in the nav, after Server-Sent Events.
  • API reference: top-level websocket() helper, websocket member on Client/AsyncClient, and WebSocketSession/AsyncWebSocketSession sections.
  • wsproto listed in the optional dependencies on the index page.

Docs build passes with no new warnings.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.