lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Nonblocking sockets problem


From: Åke Forslund
Subject: [lwip-users] Nonblocking sockets problem
Date: Mon, 12 Mar 2012 17:13:34 +0000

Hello,

 

we’ve run into a bit of a problem when we switched from blocking sockets to non-blocking sockets. From what we can tell when lwip_recvfrom() is executed it always return EWOULDBLOCK  because sock->rcvevent is never incremented and thus

 

if (((flags & MSG_DONTWAIT) || netconn_is_nonblocking(sock->conn)) &&

          (sock->rcvevent <= 0))

 

is always true. We added some debug-prints in the case NETCONN_EVT_RCVPLUS in event_callback() showing that  rcvevent was only incremented when the socket was set as blocking.

 

I’m having trouble seeing where to probe for the error so if anyone has an idea of where to look, I would be very thankful. Is there any options in lwipopt that could trigger this behavior?

From where is event_callback() triggered normally, it’s added as a callback to the netconnection-object but where is this callback called?

We’re running Lwip 1.40.

 

Best regards

/Åke Forslund

 

 

Åke Forslund

Embedded software engineer

Product Development

NIBE

Tfn: +46 (0)433 273296

E-post: address@hidden

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]