///
///
///
///
///
import { IncomingMessage, Server } from "http";
import { ServerOptions } from "ws";
import { EventEmitter } from "stream";
import { Validator } from "./validator";
import { IHandshakeInterface } from "./server-client";
import { Socket } from "net";
interface IOccpServiceOptions {
wssOptions?: ServerOptions;
protocols?: string[];
callTimeoutMs?: number;
pingIntervalMs?: number;
deferPingsOnActivity?: boolean;
respondWithDetailedErrors?: boolean;
callConcurrency?: number;
maxBadMessages?: number;
strictMode?: boolean | string[];
strictModeValidators?: Validator[];
}
declare class RPCServer extends EventEmitter {
private _httpServerAbortControllers;
private _state;
private _clients;
private _pendingUpgrades;
private _options;
private _wss;
private _strictValidators;
authCallback: (accept: (session?: Record, protocol?: string | false) => void, reject: (code: number, message: string) => void, handshake: IHandshakeInterface, signal: AbortSignal) => void;
constructor({ ...options }: IOccpServiceOptions, _callback?: () => void);
reconfigure(options: any): void;
private _onConnection;
get handleUpgrade(): (request: IncomingMessage, socket: Socket, head: Buffer) => Promise;
auth(cb: (accept: (session?: Record, protocol?: string | false) => void, reject: (code: number, message: string) => void, handshake: IHandshakeInterface, signal?: AbortSignal) => void): void;
listen(port: any, host?: any, options?: Record): Promise>;
close({ code, reason, awaitPending, force }: Record): Promise;
}
export default RPCServer;