lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7865] implement non-blocking SEND operation (socket)


From: Jonathan Larmour
Subject: [lwip-devel] [task #7865] implement non-blocking SEND operation (socket)
Date: Thu, 20 Mar 2008 14:25:02 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.12) Gecko/20070530 Fedora/1.5.0.12-1.fc5 Firefox/1.5.0.12

Follow-up Comment #1, task #7865 (project lwip):

As background, Piero is primarily concerned with the BSD sockets interface.
lwIP does implement O_NONBLOCK in the sockets layer, but only for rx. Not for
tx.

It's easy to make the first write non-blocking just by always waking up the
caller, but to allow subsequent ones to be non-blocking before the first
write's data is completely sent would require being able to store a list of
pending writes. I don't think the implementation would be meaningful until the
code does that.

Obviously you need to check against tcp_sndbuf before deciding whether to
return EAGAIN immediately or append to that list. I'm not sure whether there
should also be a check against the send queue length (TCP_SND_QUEUELEN). If
there was, there would have to be some consideration of when to trigger:
      API_EVENT(conn, NETCONN_EVT_SENDPLUS, len);
for the use of lwip_select().

As a result, to keep things simple I think it's probably best just to accept
the data for writing anyway. At least for now. Other opinions welcome.
(Especially since I at least won't be able to work on this for some time).

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7865>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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