A WebSocket connection, duck-typed over the ws WebSocket instance.
ws
WebSocket
The adapter never imports ws types at runtime; it relies on this minimal shape so ws stays an optional peer dependency and a fake socket can drive the tests.
Close the connection.
Subscribe to a socket event (message, close, error).
message
close
error
Send a serialized frame to the client.
Optional
Drop the connection without waiting for a close handshake.
A WebSocket connection, duck-typed over the
wsWebSocketinstance.The adapter never imports
wstypes at runtime; it relies on this minimal shape sowsstays an optional peer dependency and a fake socket can drive the tests.