felixge / node-ar-drone

A node.js client for controlling Parrot AR Drone 2.0 quad-copters.
http://nodecopter.com/
MIT License
1.76k stars 428 forks source link

Check connection status #70

Closed brodin closed 10 years ago

brodin commented 10 years ago

I am trying to build a server that can hold multiple Drone clients and got it working quite find, however I wonder if there is anyway to check if a client is connected or not.

Is there some event in the udpControl:er that I can lissen to? Right now the only thing I find is however the client sends navdata or not.

bkw commented 10 years ago

Navdata is probably your only option. It is used for all communication towards the client (acknowledgements, watchdog, etc). So no navdata means lack of communication.

bkw commented 10 years ago

btw: tempting as it may seem, a video stream disconnect event is actually a less accurate indicator of a lost link, since that often just collapses because of too many tcp retransmissions. Navdata is udp and in this case more reliable.

brodin commented 10 years ago

So if I dont get navdata every x millisecond I should consider the client disconnected?

bkw commented 10 years ago

Short of using some ping loop in the background, I'd say yes. Am 01.10.2013 17:15 schrieb "Johan Brodin" notifications@github.com:

So if I dont get navdata every x millisecond I should consider the client disconnected?

— Reply to this email directly or view it on GitHubhttps://github.com/felixge/node-ar-drone/issues/70#issuecomment-25458156 .