import { ReadWriteConnection, Logger } from "../common/connection"; import { ForkProvider } from "./child_process"; export interface ServerOptions { readonly fork?: ForkProvider; readonly logger?: Logger; } /** * Handle messages from the client. */ export declare class Server { private readonly connection; private readonly options?; private proxyId; private readonly proxies; private status; private readonly responseTimeout; private readonly logger; private lastDisconnect; constructor(connection: ReadWriteConnection, options?: ServerOptions | undefined); /** * Handle all messages from the client. */ private handleMessage; /** * Run a method on a proxy. */ private runMethod; /** * Send a callback to the client. */ private sendCallback; /** * Store a proxy and bind events to send them back to the client. */ private storeProxy; /** * Send an event on a numbered proxy to the client that owns it. */ private sendEvent; /** * Send a response back to the client. */ private sendResponse; /** * Send an exception back to the client. */ private sendException; private isProxyData; /** * Dispose then remove a proxy. Module proxies are immune to removal unless * otherwise specified. */ private removeProxy; /** * Same as encode but provides storeProxy. */ private encode; /** * Get a proxy. Error if it doesn't exist. */ private getProxy; private send; }