1 | import { Server as NetSocket, Socket } from 'net';
|
2 | import { Transport } from '../enums';
|
3 | import { TcpSocket } from '../helpers';
|
4 | import { CustomTransportStrategy } from '../interfaces';
|
5 | import { TcpOptions } from '../interfaces/microservice-configuration.interface';
|
6 | import { Server } from './server';
|
7 |
|
8 |
|
9 |
|
10 | export declare class ServerTCP extends Server implements CustomTransportStrategy {
|
11 | private readonly options;
|
12 | readonly transportId = Transport.TCP;
|
13 | protected server: NetSocket;
|
14 | private readonly port;
|
15 | private readonly host;
|
16 | private readonly socketClass;
|
17 | private isExplicitlyTerminated;
|
18 | private retryAttemptsCount;
|
19 | private tlsOptions?;
|
20 | constructor(options: TcpOptions['options']);
|
21 | listen(callback: (err?: unknown, ...optionalParams: unknown[]) => void): void;
|
22 | close(): void;
|
23 | bindHandler(socket: Socket): void;
|
24 | handleMessage(socket: TcpSocket, rawMessage: unknown): Promise<any>;
|
25 | handleClose(): undefined | number | NodeJS.Timer;
|
26 | private init;
|
27 | private getSocketInstance;
|
28 | }
|