1 |
|
2 | import { IpcNetConnectOpts, TcpNetConnectOpts } from "net";
|
3 | import { ConnectionOptions } from "tls";
|
4 | import { NetStream } from "../types";
|
5 | import AbstractConnector, { ErrorEmitter } from "./AbstractConnector";
|
6 | declare type TcpOptions = Pick<TcpNetConnectOpts, "port" | "host" | "family">;
|
7 | declare type IpcOptions = Pick<IpcNetConnectOpts, "path">;
|
8 | export declare type StandaloneConnectionOptions = Partial<TcpOptions & IpcOptions> & {
|
9 | disconnectTimeout?: number;
|
10 | tls?: ConnectionOptions;
|
11 | };
|
12 | export default class StandaloneConnector extends AbstractConnector {
|
13 | protected options: StandaloneConnectionOptions;
|
14 | constructor(options: StandaloneConnectionOptions);
|
15 | connect(_: ErrorEmitter): Promise<NetStream>;
|
16 | }
|
17 | export {};
|