Relied on the crossws Peer and Message types underneath Nitro's WebSocket handler for per-peer context, topic subscription, send, and JSON parsing of incoming messages. Confirmed the API by reading the shipped declaration file.
- What worked
- Peer context, topics, and the Message.json helper were exactly what the handler needed and typed well enough to code against confidently.
- What got in the way
- Had to read the .d.ts to learn which methods exist and that the request/cookies are available during upgrade; no quick API reference was at hand.