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
前端参考 Hummer Websocket 文档示例代码,建立 Websocket 连接成功,send 方法可用,但 onOpen 方法始终无法收到回调。
send
onOpen
master branch
onopen
正常打印出 WebSocket onOpen 信息。
WebSocket onOpen
const ws = new WebSocket('ws://x.x.x.x:8000'); ws.onopen = () => { console.log('WebSocket onOpen'); }
The text was updated successfully, but these errors were encountered:
调试 iOS Hummer 代码发现,(void)webSocketDidOpen:(SRWebSocket *)webSocket 方法中只是执行了连接本身的一些操作,并没有去调用 self.onOpen 。
(void)webSocketDidOpen:(SRWebSocket *)webSocket
self.onOpen
调试加上如下代码可解决:
self.onOpen ? self.onOpen(@[@{}]) : nil;
Sorry, something went wrong.
fix(iOS): add missing onopen call to WebSocket
0ca8128
fix didi#419
Successfully merging a pull request may close this issue.
描述
前端参考 Hummer Websocket 文档示例代码,建立 Websocket 连接成功,
send
方法可用,但onOpen
方法始终无法收到回调。Hummer version:
master branch
复现步骤
onopen
方法无法触发预期结果
正常打印出
WebSocket onOpen
信息。样例代码、屏幕截图或者仓库链接
The text was updated successfully, but these errors were encountered: