Replies: 1 comment 6 replies
-
请求作用域的 service,注入 ctx 即可。 |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the problem(描述问题)
使用的是@midwayjs/ws@3,我在connect的时候使用setAttr给socket设置了一个uuid,但是在别的service中使用this.wsApp.clients如何定位到这个socket呢?
或者说这个方法是错误的,那么应该如何实践呢?我是否需要额外创建一个单例service去保存每个socket会话啊
Midway Versions(Midway 版本)
npx midway-version@latest
Beta Was this translation helpful? Give feedback.
All reactions