[noPoll] nopoll_conn_new() blocking
Rami Rosenbaum
rami en modularity.co.il
Mie Dic 9 10:15:38 CET 2015
Hello,
I'm using noPoll lib in my Qt GUI application.
I am using it in non-blocking mode, within my main thread, using
timer-events and a state machine.
The scenario happens on both my Ubuntu laptop and my ARM embedded Linux.
I just noticed that when my server was down (I'm not sure what that means,
in networking concepts) - nopoll_conn_new() blocked for its' default
timeout (20 seconds).
So
*Question 1: is nopoll_conn_new() blocking?*
I found nopoll_conn_connect_timeout(), but it's not in the API.
So I changed the timeout:
m_ctx->conn_connect_std_timeout = 2 * 1000 * 1000; // 2 seconds
and it worked.
*Question 2: is nopoll_conn_connect_timeout() in the API?*
Anyway - I can't block my main thread, so what do you recommend?
Thanks
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.aspl.es/pipermail/nopoll/attachments/20151209/d98228f9/attachment.html>
Más información sobre la lista de distribución noPoll