lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_write() keeps returning ERR_MEM indefinitely once t


From: Diecol
Subject: Re: [lwip-users] tcp_write() keeps returning ERR_MEM indefinitely once the buffer is filled
Date: Mon, 13 Dec 2010 06:46:11 -0800 (PST)

Thanks a Lot

I got it.. I did with tcp_sent() out of tcp_rcv!
Now is working better than I could imagine

my troughput is 20x more thatn with uIP

Thanks again, 

Diego


Kieran Mansley wrote:
> 
> On Mon, 2010-12-13 at 02:57 -0800, Diecol wrote:
>> Can u do a example code?
> 
> I'd have a look in the contrib module for examples using the raw API.
> 
> The code that you posted that sits in a tight loop if it gets ERR_MEM
> trying smaller and smaller writes is not a good approach.   If you get
> ERR_MEM you have two choices:
> 1) Try again but send less data: you can use tcp_snd_buf() to find out
> how much space there is.
> 2) Wait until later when there is more space: you can use tcp_sent() to
> ask for a callback when there is more space.
> 
> Both of these are described in the rawapi document.
> 
> You also mentioned in an earlier email getting ERR_CONN sometimes.  I
> would look into that as it seems a bit odd.
> 
> Good luck!
> 
> Kieran
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/tcp_write%28%29-keeps-returning-ERR_MEM-indefinitely-once-the-buffer-is-filled-tp28762117p30445865.html
Sent from the lwip-users mailing list archive at Nabble.com.




reply via email to

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