Skip to content
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

websocketAuth可以和SetOnConnStart的连接打通吗? #343

Open
ppanphper opened this issue Oct 28, 2024 · 3 comments
Open

websocketAuth可以和SetOnConnStart的连接打通吗? #343

ppanphper opened this issue Oct 28, 2024 · 3 comments

Comments

@ppanphper
Copy link
Contributor

验证通过后,想要在请求中设置一些参数传递给SetOnConnStart,发现无法传递。没有一个可共享的上下文。
这样的话做聊天室,怎么一开始验证完权限后,就加入token中的房间呢?

@aceld
Copy link
Owner

aceld commented Oct 29, 2024

@ppanphper 嗯,目前确实没有加context的传递,您如果有好的思路更好,也欢迎你提交一个这地方的PR。

如果真是要传递的话,conn是也可以通过SetPerperty()来设置一些环境参数,这个参数和当前链接是绑定的。

@ppanphper
Copy link
Contributor Author

@aceld 已经提交了PR(#344),但是可能不是很好的实现。看看有没有更好的方案

@aceld
Copy link
Owner

aceld commented Nov 1, 2024

@ppanphper 感谢提交PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants