@nestjs/microservices
Version:
Nest - modern, fast, powerful node.js web framework (@microservices)
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 {};