lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCP Buffer Size Increment


From: Gaurav Jain
Subject: Re: [lwip-users] TCP Buffer Size Increment
Date: Wed, 3 Feb 2016 14:29:08 +0530

Simon,
TCP has a mechanism to increase the buffer after every successful
transaction. So after receiving how does it increase it to 1460 bytes(
the upper limit)?

On Wed, Feb 3, 2016 at 11:38 AM, Simon Goldschmidt <address@hidden> wrote:
>
> Gaurav Jain wrote:
>> I have implemented a TCP server [..]
>> I have set the buffer limit size at the client to 512 bytes. However,
>> what I am observing is that the first packet the server receives is
>> 512 bytes, but there onwards the packet size is randomly changing and
>> most of the times being 1460 bytes.
>
> Since TCP is a streaming protocol, you can never ensure the remote side
> sends 512 byte segments. You need to handle the data as it comes in
> instead or use UDP, where you can control the datagram size.
>
> One thing you could do is put an upper limit to the segment size by
> changing TCP_MSS. However, 536 is the lower limit for this, so when setting
> it to 512, the remote side is still allowed to send 536 bytes. Plus it
> is allowed to send less...
>
>
> 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]