mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
feature() add external context, microservices event patterns
This commit is contained in:
@@ -52,7 +52,10 @@ export class ClientTCP extends ClientProxy {
|
||||
share(),
|
||||
);
|
||||
|
||||
this.socket.connect(this.port, this.host);
|
||||
this.socket.connect(
|
||||
this.port,
|
||||
this.host,
|
||||
);
|
||||
this.connection = source$.toPromise();
|
||||
return this.connection;
|
||||
}
|
||||
@@ -117,4 +120,9 @@ export class ClientTCP extends ClientProxy {
|
||||
callback({ err });
|
||||
}
|
||||
}
|
||||
|
||||
protected async dispatchEvent(packet: ReadPacket): Promise<any> {
|
||||
const pattern = this.normalizePattern(packet.pattern);
|
||||
return this.socket.sendMessage(pattern);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user