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

游戏对外服 websocket 连接时,如何设置 header 中的 protocol 子协议 #29

Closed
iohao opened this issue Dec 5, 2022 · 1 comment
Assignees
Labels
trick;使用技巧 trick;使用技巧

Comments

@iohao
Copy link
Owner

iohao commented Dec 5, 2022

see https://gitee.com/iohao/iogame/issues/I64HBB

游戏对外服 websocket 连接时,如何设置 header 中的 protocol 子协议

@iohao
Copy link
Owner Author

iohao commented Dec 5, 2022

参考 ExternalChannelInitializerCallbackWebsocket 类。或自定一个类似 ExternalChannelInitializerCallbackWebsocket 的类,设置到 ExternalChannelInitializerCallbackFactory 中。

ExternalChannelInitializerCallbackFactory.me().putExternalChannelInitializerCallback(ExternalJoinEnum.WEBSOCKET,你自定义的类::new);

image

@iohao iohao closed this as completed Dec 6, 2022
@iohao iohao self-assigned this Feb 1, 2023
@iohao iohao added the trick;使用技巧 trick;使用技巧 label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trick;使用技巧 trick;使用技巧
Projects
None yet
Development

No branches or pull requests

1 participant