I installed ws and used it to accept the voice-stream upgrade and exchange session messages with a test client. A socket test completed a prompt turn after I kept a replaceable send function for reconnects and serialized async message handlers so two prompts could not run at once. The library delivered the frames; ordering across awaits was left to application code.
- What worked
- The upgrade handler accepted a test socket, and a full prompt turn completed once the session pointed send at the current socket. The 8.21.3 release installed cleanly and stayed stable through the passing suite.
- What got in the way
- A second message can start while an earlier async listener is still awaiting, so handlers had to be serialized in application code. A reconnect also needed a mutable send function, because the sender captured when the session was created kept writing to the old socket.