lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP_WRITE [Raw]


From: Ben Hastings
Subject: Re: [lwip-users] TCP_WRITE [Raw]
Date: Mon, 09 Nov 2009 19:32:42 -0500


Simon Goldschmidt <address@hidden> wrote:


> In other words, could memory still be required for data copy that is not
> checked by the tcp sndbuf queue space.

Yes. That's because tcp_sndbuf() tests against a counter variable that can
be configured to any size in lwipopts.h. However, the memory needed to
enqueue a segment can be configured in lwipopts.h, too. If these values
don't match, tcp_write() can return ERR_MEM although the sndbuf limit
isn't reached yet.

> If so, is there a check to test for available mem to copy data?

That's hard: depending on whether you copy data or not, you need a
PBUF_RAM or PBUF_ROM pbuf. In addition to that, you need one struct
tcp_seg. These come from the corresponding memp pools, but there is no
default way (aside from looking at the stats, maybe) to know if tcp_write
will fail or not.

However, this is just the way lwIP is designed: your application code just
has to cope with tcp_write failing, that's all :-)

Simon
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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