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