ruby - WebSockets, how to implement ping? -



ruby - WebSockets, how to implement ping? -

i have created websockets server in sinatra/faye websocket. has built in capabilities of pinging client, not work. ping client manually using thread sleeps n seconds , sends through sockets.

when not implement ping, connection closed client after 60 seconds of inactivity.

how properly?

i re-think if have utilize ping option... it's hardly utilized , think faye have implemented workflow if best solution.

i create javascript timer send actual info on websocket, calling empty event.

if server-side app ignores data, have effective ping javascript based , allow measure of command might missing simple ping (such recording user's lastly active time, facebook does, , other options).

ruby web websocket sinatra

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -