<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello.<br>
<br>
So, this means that the blocking/non-blocking mechanism is related
to the default initialization made by nopoll when creating a
connection.<br>
Therefore, I would be tempted to say that the documentation contains
an error:<br>
* it should not say that nopoll_conn_get_msg is not blocking,<br>
* but that nopoll_conn_new (and probably others, but not
nopoll_conn_new_with_socket, and the problem might be the same for
the server-side version of those functions) configures the socket to
not be blocking, by default.<br>
<br>
The way it is currently written is confusing, imho.<br>
<br>
<div class="moz-cite-prefix">Le 21/12/2017 à 15:19, Francis Brosnan
Blázquez a écrit :<br>
</div>
<blockquote type="cite" cite="mid:1513865979.28743.12.camel@aspl.es">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="GtkHTML/4.8.5">
Hello Morel.<br>
<br>
Just confirm nopoll_conn_get_msg design is non-blocking.<br>
<br>
If it is blocking, configure socket passed to noPoll reference to
be<br>
non-blocking.<br>
<br>
That will make the function to return NULL when nothing is
available.<br>
<br>
See:<br>
<br>
<a
href="http://www.aspl.es/nopoll/html/group__nopoll__conn_gac8d6596af3f6e20155c7b674555dc078.html#gac8d6596af3f6e20155c7b674555dc078"
moz-do-not-send="true">http://www.aspl.es/nopoll/html/group__nopoll__conn_gac8d6596af3f6e20155c7b674555dc078.html#gac8d6596af3f6e20155c7b674555dc078</a><br>
<br>
Best Regards.<br>
<br>
<br>
<br>
El jue, 21-12-2017 a las 14:59 +0100, Morel Bérenger escribió:
<blockquote type="CITE">
<pre>Hello.
When trying to make nopoll work with my own polling mechanism, I have
noticed that nopoll_conn_get_msg is blocking.
Here is the stack trace when breaking in with gdb:
====================
Program received signal SIGINT, Interrupt.
0x00007ffff70e247d in __libc_recv (fd=10, buf=0x7fffffffcf30, n=2,
flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29
29 ../sysdeps/unix/sysv/linux/x86_64/recv.c: Aucun fichier ou
dossier de ce type.
(gdb) bt
#0 0x00007ffff70e247d in __libc_recv (fd=10, buf=0x7fffffffcf30, n=2,
flags=-1) at ../sysdeps/unix/sysv/linux/x86_64/recv.c:29
#1 0x00007ffff7bcbaeb in nopoll_conn_default_receive (conn=<optimized
out>, buffer=0x7fffffffcf30 "\207\254A", buffer_size=<optimized out>) at
nopoll_conn.c:2158
#2 0x00007ffff7bcda14 in __nopoll_conn_receive (conn=0x6201b0,
buffer=0x7fffffffcf30 "\207\254A", maxlen=2) at nopoll_conn.c:2349
#3 0x00007ffff7bcf6e6 in nopoll_conn_get_msg (conn=0x6201b0) at
nopoll_conn.c:3231
====================
Maybe it is caused by the fact I used "nopoll_conn_new_with_socket( ctx,
NULL, socket_fd, ip, port, hostname, url, protocols, NULL);", ctx only
behing the result of the nopoll_ctx_new() function?
</pre>
</blockquote>
<br>
<table cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
-- <br>
<br>
Francis Brosnan Blázquez - ASPL <br>
91 134 14 22 - 91 134 14 45 <br>
<br>
<a href="http://aspl.es" moz-do-not-send="true">http://aspl.es</a>
<br>
<a href="http://asplhosting.com" moz-do-not-send="true">http://asplhosting.com</a>
<br>
<a href="http://twitter.com/aspl_es"
moz-do-not-send="true">http://twitter.com/aspl_es</a> <br>
<a href="http://twitter.com/asplhosting"
moz-do-not-send="true">http://twitter.com/asplhosting</a><br>
<a
href="https://www.linkedin.com/in/francis-brosnan-bl%C3%A1zquez-1353a218/"
moz-do-not-send="true">https://www.linkedin.com/in/francis-brosnan-bl%C3%A1zquez-1353a218/</a><br>
<br>
AVISO LEGAL <br>
<br>
Este mensaje se dirige exclusivamente a su destinatario.
Los datos<br>
incluidos en el presente correo son confidenciales y
sometidos a<br>
secreto profesional, se prohíbe divulgarlos, en virtud de
las leyes<br>
vigentes. Si usted no lo es y lo ha recibido por error o
tiene<br>
conocimiento del mismo por cualquier motivo, le rogamos
que nos lo<br>
comunique por este medio y proceda a destruirlo o
borrarlo. <br>
<br>
En virtud de lo dispuesto en la Ley Orgánica 15/1999, de
13 de<br>
diciembre, de Protección de Datos de Carácter Personal, le
informamos<br>
de que sus datos de carácter personal, recogidos de
fuentes accesibles<br>
al público o datos que usted nos ha facilitado
previamente, proceden de<br>
bases de datos propiedad de Advanced Software Production
Line, S.L.<br>
(ASPL). No obstante, usted puede ejercitar sus derechos de
acceso,<br>
rectificación, cancelación y oposición dispuestos en la
mencionada Ley<br>
Orgánica, notificándolo por escrito a: ASPL - Protección
Datos,<br>
C/Antonio Suárez 10 A-102, 28802, Alcalá de Henares
(Madrid).
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
SGA Automation
27 Rue Jean-Philippe Rameau
Pôle Delta
76000 Rouen
Tel : 02 32 10 38 53
Fax : 02 32 10 11 30
<a class="moz-txt-link-abbreviated" href="http://www.sga-automation.com">www.sga-automation.com</a>
Email : <a class="moz-txt-link-abbreviated" href="mailto:berenger.morel@sga-automation.com">berenger.morel@sga-automation.com</a></pre>
</body>
</html>