function bindDenoSocketToSink
Since 0.2.0
bindDenoSocketToSink(
sink: WebSocketEventSink
): void

Binds a Deno socket's event handlers to a sink.

onopen is what drives WebSocketEventSink.onOpen, so the sink is never handed a transport it cannot yet write to.

Parameters

The native socket

sink: WebSocketEventSink

The sink to drive

Return Type

void

Usage

import { bindDenoSocketToSink } from "runtime/src/index.ts";