srb007 / audioscout

Automatically exported from code.google.com/p/audioscout
GNU General Public License v3.0
0 stars 0 forks source link

recieve_msg and send_msg timeout #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Version 1.0.4
Please is it possible for us to get a timeout on the send_msg and receive_msg 
so that if the server is not up, the client can timeout/abort appropriately?

In my case: "Sending query ..." stayed up for over 2 minutes. I had to do 
Ctrl-C to abort.

Original issue reported on code.google.com by solomona...@gmail.com on 27 Jul 2012 at 9:50

GoogleCodeExporter commented 8 years ago
The client app, auscout-client.c has no timeout.  You could repeatedly poll the 
socket using zmq's poller mechanism, and time out accordingly.  The client app 
is just an example app to interact with the server.

Original comment by starkd88@gmail.com on 27 Jul 2012 at 3:15

GoogleCodeExporter commented 8 years ago
You rightly tested for zmq_connect. Unfortunately, it returns 0 whether success 
or otherwise. I will have to fix it in the client for now. I will try the 
polling you suggested.

Original comment by solomona...@gmail.com on 27 Jul 2012 at 7:05