lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [task #7865] implement non-blocking SEND operation (soc


From: latkinso42
Subject: Re: [lwip-devel] [task #7865] implement non-blocking SEND operation (socket)
Date: Wed, 23 Jun 2010 11:29:02 -0700 (PDT)

Doug,
I am very much interested in a solution to the non-blocking issue for a
write (send).
My buffer is perhaps 180+ in size holding an http GET request. No way to
make it smaller.
Currently the max buffer, TCP_SND_BUF, is 265 in opt.h and the TCP_SNDLOWAT
is half that.
The write (lwip_write or lwip_send) is returning an err = 248 which is the
buffer size. I can make it somewhat smaller, but no small er than 180. Can I
send part of buffer with multiple write until done or 
do you have a techniques that works and does not block?
Lee
 

Doug Simons-3 wrote:
> 
> 
> Update of task #7865 (project lwip):
> 
>                   Status:                    None => Ready For Test         
>         Percent Complete:                      0% => 90%                    
>              Assigned to:                    None => goldsimon              
> 
>     _______________________________________________________
> 
> Follow-up Comment #7:
> 
> As described in last comment, I've added nonblocking write (for netconn
> and
> sockets). Once such a nonblocking write failed, sent_tcp and poll_tcp will
> check if there's enough buffer and mark the socket writable again.
> 
> Also, lwip_send() checks if the data would ever fit into the buffers and
> returns EMSGSIZE if not - I'm not sure what's the correct error here...
> 
> There's one lwIP-related problem: when a nonblocking write fails and
> poll_tcp
> marks the socket writable again, the next call could fail again if 'size >
> TCP_SNDLOWAT' (because TCP_SNDLOWAT is used when marking the socket
> writable).
> I don't know how other stacks solve this, but for us, the next call to
> write
> would return EAGAIN again.
> 
>     _______________________________________________________
> 
> Reply to this item at:
> 
>   <http://savannah.nongnu.org/task/?7865>
> 
> _______________________________________________
>   Nachricht geschickt von/durch Savannah
>   http://savannah.nongnu.org/
> 
> 
> 
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-devel
> 
> 

-- 
View this message in context: 
http://old.nabble.com/-task--7865--implement-non-blocking-SEND-operation-%28socket%29-tp16179537p28975239.html
Sent from the lwip-devel mailing list archive at Nabble.com.




reply via email to

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