Interface WebSocketConnection

WebSocket connection interface

interface WebSocketConnection {
    created: number;
    id: string;
    socket: WebSocket;
    state: WebSocketState;
    type: "websocket";
    url: string;
    close(): Promise<void>;
}

Properties

Methods

Properties

created: number

Timestamp when connection was created

id: string

Unique identifier for this connection

socket: WebSocket

The WebSocket instance

Human-readable connection state

type: "websocket"

Connection type

url: string

URL of the connection

Methods