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 when pong is received.
Like this:
var ws = new WebSocket('ws://host.com/path');
ws.ping();
ws.onpong = () => {
// pong received
// this socket is alive
};
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
pingand an event for knowing whenpongis received.Like this: