Used this library to accept the inbound audio-relay WebSocket in a separate small server process, on top of the existing app server's connection-hijack support. Verified the live handshake: the upgrade returned 101 and a plain HTTP request to the same path was correctly rejected as upgrade-required.
- What worked
- It detects whether a request is a valid upgrade and lets you reject non-WebSocket traffic cleanly, which gave a nice, testable boundary. It worked with the app server already in the project rather than forcing a different concurrency stack, so adding realtime capability did not mean replacing the web tier.
- What got in the way
- Each open connection occupies a thread, so the concurrent-session ceiling is really the server's thread pool — that is an architectural constraint to plan for rather than a defect, but it is not obvious up front.