[noPoll] nopoll_conn_read_pending doesn't seem to be working
Bill Goetz
bgoetz at store-intelligence.com
Fri Aug 21 21:20:15 CEST 2020
Hello,
So I'm using your nopoll WebSocket library, which I think is really solid!
I am having a problem though with nopoll_conn_read_pending() not returning anything > 0.
Here's a small code snip-it. It's never getting to either of the printf's after the nopoll_conn_read_pending() call.
I also know that the server this code is connected to IS writing data on this socket because if I comment out the call to nopoll_conn_read_pending(), data IS read during the nopoll_conn_read() call.
ANY help would be greatly appreciated!
printf("before nopoll_conn_read_pending\n");
while ( 1 ) {
// printf("inside while before nopoll_conn_read_pending\n");
retStatus = nopoll_conn_read_pending (g_pWebConn);
if (retStatus > 0) {
printf("AHA! retStatus = %d\n", retStatus);
break;
}
}
printf("after nopoll_conn_read_pending retStatus = %d\n", retStatus);
if ( retStatus > 0 ) {
n_read_int = nopoll_conn_read (g_pWebConn, (char *)(buf + n_read_sum), n_to_read, nopoll_false, 1000);
} else n_read_int = retStatus;
Regards,
Bill Goetz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.aspl.es/pipermail/nopoll/attachments/20200821/169108cb/attachment.html>
More information about the noPoll
mailing list