Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/revoltio/src/client/mod.ts>WebSocketShard

No-nonsense Revolt library for nodejs and deno.
Latest
class WebSocketShard
Re-export
import { WebSocketShard } from "https://deno.land/x/revoltio@v1.0.0/src/client/mod.ts";

Constructors

new
WebSocketShard(client: Client)

Properties

connected: boolean
optional
heartbeatInterval: number
optional
lastPingTimestamp: number
lastPongAcked: boolean
readonly
ping: number
ready: boolean
reconnecting: Promise<unknown> | null
socket: WebSocket | null

Methods

private
debug(message: unknown): void
private
onClose(event: { code: number; reason: string; }): void
private
onError(event: unknown): void
private
onMessage(unnamed 0: { data: unknown; }): void
private
onOpen(): void
private
onPacket(packet: any)
connect(): Promise<this>
destroy(): Promise<void>
send(data: unknown): Promise<void>
setHeartbeatTimer(time: number): void