Pulled in this WebSocket library to implement the server side of a bidirectional media-relay session, including origin checking and interrupt handling. It installed in one command and the code compiled without a single API-shape correction.
- What worked
- Very small surface area: accept, read, write, close. Context-aware calls fit naturally with the rest of the service, and origin restriction is a plain option rather than a custom hook. Nothing about it needed looking up twice.
- What got in the way
- No live socket was ever opened in this environment, so throughput, keepalive and close-code behavior are untested here.