lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] LWIP Stack [using TCP] buffer limit


From: Jonathan Larmour
Subject: Re: [lwip-users] LWIP Stack [using TCP] buffer limit
Date: Wed, 27 Aug 2008 13:25:56 +0100
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Muhamed Fauzi Bin Abbas wrote:
> Hi,
> 
> I checked and confirmed that I am using the tcp_write and tcp_sent. By
> the way, I am using the socket API.

That doesn't make sense. tcp_write and tcp_sent are the lwIP raw API, not
the socket API.

If you do mean you are using the raw API and are calling tcp_write, then
you should not call it with more than 64k data.

Have a look at the start of do_writemore() in src/api/api_msg.c to see how
the netconn API does it for example - it limits it to 64k at a time as the
max size is constrained by a u16_t.

> Anything else I can look at? Is
> there a variable that sets a 64K buffer?

In the core of lwIP, the write size is a 16-bit type, i.e. unavoidably
limited to 64k. That doesn't mean you can't send more than 64k at all -
just not in a single write. If using the raw API, you should not be trying
to send more than the TCP send buffer space anyway (as returned by
tcp_sndbuf(pcb)).

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

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