Ping-pong messages for WebSockets


#1

Hi,

I need to detect if websocket connection to DataSift is stalled or alive.

In one of the replies on the forum (http://dev.datasift.com/discussions/how-detect-stalled-http-or-websocket-connection) you mentioned that you are going to implement ping-pong messages for DataSift websocket connection to make it possible to detect stalled websocket connections. Is ping-pong for websockets already available?

Thanks,
Artsiom


#2

Ping-pong for WebSockets has now been implemented for our live streaming API. If you send a WebSocket 'ping' frame to stream.datasift.com, you will get a 'pong' frame in response. We will also send 'pings' after 30 seconds of inactivity in the same way as we send our HTTP 'ticks' (these do not expect a 'pong' response, but will accept them).