forked from nestjs/nest
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient-tcp.d.ts
More file actions
21 lines (21 loc) · 841 Bytes
/
Copy pathclient-tcp.d.ts
File metadata and controls
21 lines (21 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import * as JsonSocket from 'json-socket';
import { PacketId, ReadPacket, WritePacket } from '../interfaces';
import { ClientOptions } from '../interfaces/client-metadata.interface';
import { ClientProxy } from './client-proxy';
export declare class ClientTCP extends ClientProxy {
protected connection: Promise<any>;
private readonly logger;
private readonly port;
private readonly host;
private isConnected;
private socket;
constructor(options: ClientOptions['options']);
connect(): Promise<any>;
handleResponse(buffer: WritePacket & PacketId): any;
createSocket(): JsonSocket;
close(): void;
bindEvents(socket: JsonSocket): void;
handleError(err: any): void;
handleClose(): void;
protected publish(partialPacket: ReadPacket, callback: (packet: WritePacket) => any): Function;
}