HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/design.system/node_modules/msw/lib/core/ws/WebSocketClientManager.d.ts
import { WebSocketData, WebSocketClientConnectionProtocol, WebSocketClientConnection } from '@mswjs/interceptors/WebSocket';

type WebSocketBroadcastChannelMessage = {
    type: 'extraneous:send';
    payload: {
        clientId: string;
        data: WebSocketData;
    };
} | {
    type: 'extraneous:close';
    payload: {
        clientId: string;
        code?: number;
        reason?: string;
    };
};
/**
 * A manager responsible for accumulating WebSocket client
 * connections across different browser runtimes.
 */
declare class WebSocketClientManager {
    private channel;
    private store;
    private runtimeClients;
    private allClients;
    constructor(channel: BroadcastChannel);
    private flushDatabaseToMemory;
    private removeRuntimeClients;
    /**
     * All active WebSocket client connections.
     */
    get clients(): Set<WebSocketClientConnectionProtocol>;
    /**
     * Notify other runtimes about the database update
     * using the shared `BroadcastChannel` instance.
     */
    private notifyOthersAboutDatabaseUpdate;
    private addClient;
    /**
     * Adds the given `WebSocket` client connection to the set
     * of all connections. The given connection is always the complete
     * connection object because `addConnection()` is called only
     * for the opened connections in the same runtime.
     */
    addConnection(client: WebSocketClientConnection): Promise<void>;
}
/**
 * A wrapper class to operate with WebSocket client connections
 * from other runtimes. This class maintains 1-1 public API
 * compatibility to the `WebSocketClientConnection` but relies
 * on the given `BroadcastChannel` to communicate instructions
 * with the client connections from other runtimes.
 */
declare class WebSocketRemoteClientConnection implements WebSocketClientConnectionProtocol {
    readonly id: string;
    readonly url: URL;
    private channel;
    constructor(id: string, url: URL, channel: BroadcastChannel);
    send(data: WebSocketData): void;
    close(code?: number | undefined, reason?: string | undefined): void;
}

export { type WebSocketBroadcastChannelMessage, WebSocketClientManager, WebSocketRemoteClientConnection };