1 |
|
2 | import { ConnectionOptions } from 'tls';
|
3 | import { TcpSocket } from '../helpers';
|
4 | import { ReadPacket, WritePacket } from '../interfaces';
|
5 | import { TcpClientOptions } from '../interfaces/client-metadata.interface';
|
6 | import { ClientProxy } from './client-proxy';
|
7 |
|
8 |
|
9 |
|
10 | export declare class ClientTCP extends ClientProxy {
|
11 | protected connection: Promise<any>;
|
12 | private readonly logger;
|
13 | private readonly port;
|
14 | private readonly host;
|
15 | private readonly socketClass;
|
16 | private isConnected;
|
17 | private socket;
|
18 | tlsOptions?: ConnectionOptions;
|
19 | constructor(options: TcpClientOptions['options']);
|
20 | connect(): Promise<any>;
|
21 | handleResponse(buffer: unknown): Promise<void>;
|
22 | createSocket(): TcpSocket;
|
23 | close(): void;
|
24 | bindEvents(socket: TcpSocket): void;
|
25 | handleError(err: any): void;
|
26 | handleClose(): void;
|
27 | protected publish(partialPacket: ReadPacket, callback: (packet: WritePacket) => any): () => void;
|
28 | protected dispatchEvent(packet: ReadPacket): Promise<any>;
|
29 | }
|