lundi 13 avril 2015

WebSockets, how to implement ping?

I have created a WebSockets server in Sinatra/Faye Websocket. It has some built in capabilities of pinging the client, but it does not work. So I ping client manually using a thread which sleeps for N seconds and then sends something through sockets.


When I not implement ping, the connection is closed by client after 60 seconds of inactivity.


How to do it properly?





Aucun commentaire:

Enregistrer un commentaire