std@0.95.0/ws/mod.ts

Deno standard library
GitHub Stars
2260
Go to Latest

acceptWebSocket

import { acceptWebSocket } from "https://deno.land/std@0.95.0/ws/mod.ts";

Upgrade inputted TCP connection into WebSocket connection.

async function acceptWebSocket(req: {
conn: Deno.Conn;
bufWriter: BufWriter;
bufReader: BufReader;
headers: Headers;
}
): Promise<WebSocket>;