Skip to main content
Module

x/grm/deps.ts>w3cwebsocket

MTProto API Client for Deno 🦕
Go to Latest
class w3cwebsocket
import { w3cwebsocket } from "https://deno.land/x/grm@0.5.2/deps.ts";

Constructors

new
w3cwebsocket(
url: string,
protocols?: string | string[],
origin?: string,
headers?: http.OutgoingHttpHeaders,
requestOptions?: object,
IClientConfig?: IClientConfig,
)

Properties

_binaryType: "arraybuffer"
_bufferedAmount: number
_client: client
optional
_connection: connection | undefined
_extensions: IExtension[]
optional
_protocol: string | undefined
_readyState: number
_url: string
binaryType: "arraybuffer"
bufferedAmount: number
CLOSED: number
CLOSING: number
CONNECTING: number
extensions: IExtension[]
onclose: (event: ICloseEvent) => void
onerror: (error: Error) => void
onmessage: (message: IMessageEvent) => void
onopen: () => void
OPEN: number
optional
protocol: string | undefined
readyState: number
url: string

Methods

close(code?: number, reason?: string): void
send(data:
| ArrayBufferView
| ArrayBuffer
| IStringified
): void

Static Properties

CLOSED: number
CLOSING: number
CONNECTING: number
OPEN: number