WebSocketPeerEvents
WebSocketPeerEvents =
object
Defined in: packages/net-websocket/src/peer/websocket-peer.ts:41
Events emitted by a WebSocketPeer.
Properties
Section titled “Properties”close: [
number,string,boolean]
Defined in: packages/net-websocket/src/peer/websocket-peer.ts:63
The connection is closed, exactly once.
code
What the peer sent, 1005 when it sent no code, or 1006 when
the connection dropped without a closing handshake.
wasClean
Whether both close frames were exchanged.
error: [
unknown]
Defined in: packages/net-websocket/src/peer/websocket-peer.ts:54
The peer broke the protocol (a WebSocketFrameError) or the transport
failed. The connection is being failed; close follows.
message
Section titled “message”message: [
string|Uint8Array]
Defined in: packages/net-websocket/src/peer/websocket-peer.ts:43
A complete message: text as a string, binary as bytes.
ping: [
Uint8Array]
Defined in: packages/net-websocket/src/peer/websocket-peer.ts:46
A ping arrived; the pong is already on its way.
pong: [
Uint8Array]
Defined in: packages/net-websocket/src/peer/websocket-peer.ts:48