|
From: | Francesco Sacchi |
Subject: | Re: [lwip-users] Non-blocking I/O in lwip |
Date: | Fri, 22 Jul 2011 18:34:40 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
Il 22/07/2011 12:36, Simon Goldschmidt ha scritto:
Francesco Sacchi<address@hidden> wrote:We see that non-blocking sending has been implemented in lwip-1.4, and here is our question: if we upgrade will this issue be solved? In other words, if I open a socket in non-blocking mode, I suppose that the lwip_send() will return an error in case it would block (EWOULDBLOCK), but then, if I close the socket, will the memory allocated be freed correctly?Yes, 1.4.0 should work for you: if no buffers are available, a non-blocking send returns EWOULDBLOCK (which a blocking send waits indefinitly for memory to become available).
Ok, but if I close a blocked socket, will the memory allocated by the socket itself be freed?
However, you might want to control the amount of data buffered on the listening connection so that the out-of-memory condition doesn't happen at all?
Could you be more specific? What listenig connection do you refer to? If you are talking about the server side connection, that is not accessible to us because resides on a PC and the software is not editable by us.
-- |/ Francesco Sacchi - Develer S.r.l. -| http://www.develer.com/ - http://www.bertos.org/ |\ Tel: +39 055 3984627 ext 208
[Prev in Thread] | Current Thread | [Next in Thread] |