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 .ping and .onpong missing #14855
Comments
Update. |
Android native code uses OkHttp for WebSocket and that does not seem to handle pong. However, the RN codebase includes an iOS version of OkHttp and it supports pong. RCTSRWebSocket handles pong and calls the delegate, but RCTWebSocketModule does not implement didReceivePong method. Just a few lines of code copy-pasted from onopen to relay the event to JavaScript... RCTWebSocketModule.m:
WebSocket.js:
RCTReconnectingWebSocket.m |
That's great news! Thank you. |
I'm thinking about that :-) Probably need to do it to Android OkHttp too. |
Websocket in RN seems to to respond correctly with a pong when ping is received (as per the Websockets spec.).
It would be great if there also where a function to send a
ping
and an event for knowing whenpong
is received.Like this:
The text was updated successfully, but these errors were encountered: