Begins handling the socket in this isolate.
Not to be confused with state.acceptWebSocket, which is the DO-side
hibernation call — see IDurableObjectState.acceptWebSocket.
Subscribes to a socket event.
The event name
Invoked per event
Closes the connection.
Optionalcode: number
The close code
Optionalreason: string
The close reason
Sends one frame to the peer.
The payload to send
The client half of a
WebSocketPair, or the socket a Worker gets back from a Durable Object upgrade.Distinct from
IDurableObjectWebSocketbecause this side must beaccept()ed and listened to, while the DO side is accepted by the runtime throughstate.acceptWebSocketand never listened to directly.Since
0.2.0