We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最近一直在学习这个聊天室,本人初学不久,有个问题想请教。 在Server中,this.socket.user 这里的user是在哪里添加的成员变量呢?没有找到....在Client的socket.js中没有这个成员啊。 求教,感谢!!
The text was updated successfully, but these errors were encountered:
不好意思, 一直没看到该问题, 回复晚了. 在该处添加的, https://github.com/yinxin630/fiora/blob/master/src/server/police/isLogin.js#L22 验证用户是否登录, 并从token中取出用户id, 负载在socket对象上. 不过下一版我已经改了这套机制, 用户信息将会与socket实例绑定, 而不是每次请求都重复计算
Sorry, something went wrong.
No branches or pull requests
最近一直在学习这个聊天室,本人初学不久,有个问题想请教。
在Server中,this.socket.user 这里的user是在哪里添加的成员变量呢?没有找到....在Client的socket.js中没有这个成员啊。
求教,感谢!!
The text was updated successfully, but these errors were encountered: