【发布时间】:2021-08-13 20:20:29
【问题描述】:
在 Nest.js 中,我使用 tcp 架构进行微服务通信,在 socket.io 连接中,我能够连接微服务,如下所示,但我无法读取响应。
this.client.emit
this.client.send({ service: 'getSingleRoom' }, payload).toPromise();
这两个代码都与微服务连接,但是我无法读出此响应,以便我可以在主服务器中发出。我在nest.js 中使用网络套接字。
【问题讨论】:
-
等待审核无法编辑,建议您将代码行设为代码格式。
标签: websocket tcp microservices nestjs tcpclient