@nestjs/microservices
Version:
Nest - modern, fast, powerful node.js web framework (@microservices)
22 lines (21 loc) • 405 B
JavaScript
import { BaseRpcContext } from './base-rpc.context.js';
/**
* @publicApi
*/
export class TcpContext extends BaseRpcContext {
constructor(args) {
super(args);
}
/**
* Returns the underlying JSON socket.
*/
getSocketRef() {
return this.args[0];
}
/**
* Returns the name of the pattern.
*/
getPattern() {
return this.args[1];
}
}