Adapts a ws WebSocket connection to a DuplexMessageStream for
handleMuxedBidiSocket. Message boundaries are preserved, as the muxed
protocol requires: each binary message becomes exactly one readable
chunk, and each written chunk is sent as one binary WebSocket message.
Closing or erroring the socket in either direction propagates to both
the readable and the writable side.
Adapts a
wsWebSocket connection to aDuplexMessageStreamforhandleMuxedBidiSocket. Message boundaries are preserved, as the muxed protocol requires: each binary message becomes exactly one readable chunk, and each written chunk is sent as one binary WebSocket message. Closing or erroring the socket in either direction propagates to both the readable and the writable side.