Closes the socket.
Optionalcode: number
RFC 6455 close code (defaults to 1000)
Optionalreason: string
Human-readable close reason
Sends a frame to the peer. A string is sent as a text frame, a
Uint8Array as a binary frame.
The frame payload
The runtime-native socket, normalized to the two operations the framework needs. Implemented by each HTTP adapter's upgrader over its platform socket (
Deno.upgradeWebSocket'sWebSocket, awssocket on Node, Bun'sServerWebSocket, the server half of a WorkersWebSocketPair).Since
0.2.0