New issue
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
websocket 区分消息来自哪个连接 #534
Comments
智能指针本身,fd、id、peeraddr、或者通过setContextPtr设置上下文,都可以区分 |
不能使用fd来关联连接,因为fd会被复用. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
大佬,我创建了一个websocket服务器,并且与两个websocket客户端连接了。 当服务器收到消息的时候,我需要怎么区分消息来自于哪个客户端呢? 目前我是采用记录 WebSocketChannelPtr的fd来区分的,不知道大佬还有啥更好的办法没?感谢大佬
The text was updated successfully, but these errors were encountered: