lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Fail on too much data?


From: Tomáš Švec
Subject: Re: [lwip-users] Fail on too much data?
Date: Mon, 10 Sep 2012 15:59:15 +0200

Right, makes sense :) Thanks for the quick explanation.
I have one more question, however - if I decide to send huge chunks of data (like some hi-res pictures stored in an external flash via SPI or something), does that mean I need to set TCP_SND_BUF to the greatest size of the file I will be sending?

Tomas

2012/9/10 Simon Goldschmidt <address@hidden>
Tomáš Švec wrote:

> When I step through the code, it stops in tcp_out.c on these lines:
>
>   /* fail on too much data */
>   if (len > pcb->snd_buf)...
>
> I am sending 1150 bytes, while there is only a 256 bytes sending buffer. I get that, but how is it supposed to be sent correctly? Should my code handle the fragmentation itself?

Yes, it should.

> That doesn't make sense, does it?

Regarding TCP it doesn't make sense. Regarding embedded systems, it does: You have configured lwIP in a way to limit its internal buffer memory lower than your code expects it to. In other words it's a configuration problem: TCP_SND_BUF is not big enough to send your data in one chunk. This is not a problem but your application must be able to handle this or you can incise the send buffer if your available memory allows it.

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


reply via email to

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