Interface WsServerOptions

interface WsServerOptions {
    connectionTimeout?: number;
    requestTimeout?: number;
    maxMessageSize?: number;
    autoReconnect?: boolean;
    maxReconnectAttempts?: number;
    reconnectDelay?: number;
    reconnectBackoffMultiplier?: number;
    maxReconnectDelay?: number;
    host?: string;
    maxConnections?: number;
    server?: Server<typeof IncomingMessage, typeof ServerResponse> | Server<typeof IncomingMessage, typeof ServerResponse>;
    path?: string;
    pingInterval?: number;
    pongTimeout?: number;
    perMessageDeflate?: boolean;
}

Hierarchy

Properties

connectionTimeout?: number

Connection timeout in milliseconds

requestTimeout?: number

Request timeout in milliseconds (default: 30000)

maxMessageSize?: number

Maximum message size in bytes (default: 1MB)

autoReconnect?: boolean

Enable automatic reconnection (client only)

maxReconnectAttempts?: number

Maximum reconnection attempts

reconnectDelay?: number

Reconnection delay in milliseconds

reconnectBackoffMultiplier?: number

Reconnection backoff multiplier

maxReconnectDelay?: number

Maximum reconnection delay in milliseconds

host?: string

Host to bind to

maxConnections?: number

Maximum concurrent connections

server?: Server<typeof IncomingMessage, typeof ServerResponse> | Server<typeof IncomingMessage, typeof ServerResponse>

Existing HTTP(S) server to attach to

path?: string

WebSocket path (default: "/")

pingInterval?: number

Ping interval in milliseconds (0 to disable)

pongTimeout?: number

Client pong timeout in milliseconds

perMessageDeflate?: boolean

Enable per-message deflate compression