Hi  Alain,

W dniu wtorek, 20 września 2016 02:19:46 UTC+2 użytkownik Alain Mouette 
> Hi Zlatko, thanks for the detailed answer :) 
> My client is IoT and this brings some limitations... 
> First I am limited by what libs I can find on the hardware side, then 
> the IoT can be switched off without proper signaling. And I need to 
> control that and react on connection loss. 
> I couldn't find any option for keepalive on either side of the 
> comunication, I am using: 
> IoT side: https://github.com/Links2004/arduinoWebSockets 
> Node.js <https://github.com/Links2004/arduinoWebSocketsNode.js>: 
> https://github.com/websockets/ws 
> About websockets/ws maybe that talk will help 
you:) https://github.com/websockets/ws/issues/459
The ws module don't have keepalive for now, but the module use socket 
module from node.js :) and you can implement your keepalavie method by 
: https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay


> We have just moved to WebSockets, I am implementing from scratch and I 
> am gathering information because I don't want to go through a bad path 
> If you or anyone, has any idea, I would be glad to hear :) 
> Thanks (again), 
> Alain Mouette 
> === Projetos especiais: <http://lnkd.in/dEu8cNq> === 
> On 19-09-2016 05:23, Zlatko wrote: 
> > 5000 timers per se should not be a problem to measure nor a problem to 
> > the app. It's not even a strain to the connections: it amounts to 
> > approximately 83 pings per sec, which is not too much. 
> > 
> > But the bigger question is why do you want this? Just to keep sockets 
> > alive? You can set this option in your websocket implementation of 
> > choice (well, the most used ones, at least). Tell ws to do it's own 
> > keepalive and you don't have to do bookkeeping. 
> > 
> > If it's to relay changes in some sort of state to all the clients, 
> > then again - why not simply sending updates as they happen? That's 
> > kind of the advantage of websockets - if you wanted timers, you could 
> > simply schedule regular REST requests on the client and not mess with 
> > all of this. 
> > 
> > 

Job board: http://jobs.nodejs.org/
New group rules: 
Old group rules: 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to