@nestjs/microservices
Version:
Microservices for NestJS: message and event handlers over Kafka, RabbitMQ, NATS, Redis, MQTT, gRPC or TCP.
24 lines (23 loc) • 686 B
TypeScript
import { TcpSocket } from '../helpers/index.js';
import { PacketMetadata } from '../interfaces/packet.interface.js';
import { BaseRpcContext } from './base-rpc.context.js';
type TcpContextArgs = [TcpSocket, string, PacketMetadata?];
/**
* @publicApi
*/
export declare class TcpContext extends BaseRpcContext<TcpContextArgs> {
constructor(args: TcpContextArgs);
/**
* Returns the underlying JSON socket.
*/
getSocketRef(): TcpSocket;
/**
* Returns the name of the pattern.
*/
getPattern(): string;
/**
* Returns the metadata the client attached to the packet, if any.
*/
getMetadata(): PacketMetadata | undefined;
}
export {};