You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
769 B

1 month ago
/// <reference types="node" />
import { IpcNetConnectOpts, TcpNetConnectOpts } from "net";
import { ConnectionOptions } from "tls";
import { NetStream } from "../types";
import AbstractConnector, { ErrorEmitter } from "./AbstractConnector";
declare type TcpOptions = Pick<TcpNetConnectOpts, "port" | "host" | "family">;
declare type IpcOptions = Pick<IpcNetConnectOpts, "path">;
export declare type StandaloneConnectionOptions = Partial<TcpOptions & IpcOptions> & {
disconnectTimeout?: number;
tls?: ConnectionOptions;
};
export default class StandaloneConnector extends AbstractConnector {
protected options: StandaloneConnectionOptions;
constructor(options: StandaloneConnectionOptions);
connect(_: ErrorEmitter): Promise<NetStream>;
}
export {};