Skip to main content
Module

x/websocket/mod.ts>StandardWebSocketClient

🦕 A simple WebSocket library like ws of node.js library for deno
Latest
class StandardWebSocketClient
implements WebSocketClient
extends GenericEventEmitter<DefaultClientEventTypes<any>>
import { StandardWebSocketClient } from "https://deno.land/x/websocket@v0.1.4/mod.ts";

Constructors

new
StandardWebSocketClient(endpoint?: string)

Properties

readonly
isClosed: boolean | undefined
optional
webSocket: WebSocket

Methods

close(code?, reason?: string): Promise<void>
closeForce(): void
ping(message?: string | Uint8Array)
send(message: string | Uint8Array)