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
Post a Comment