lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Sending as big packets as possible


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] Sending as big packets as possible
Date: Wed, 08 Jan 2003 23:22:39 -0000

Hi!

On Wednesday 26 June 2002 16.06, you wrote:
> How can I send as big packets as possible?
> Currently I do something like this:
> tcp_write(pcb, buffer, 2048);
> I guess this sends two packets, one with the MSS size (f.e. 1480) and the
> other with the rest. But this is wasted in my opinion. should I just send
> MSS bytes, or is there some other value for this, like the size of the
> current window or something? The tcp_sndbuf functions returns a value which
> is greater than the possible packet.

If you just want to send as large segments as possible, you could use 
tcp_write(pcb, buffer, TCP_MSS), or even tcp_write(pcb, buffer, pcb->mss). 
The latter is kind of a hack, but since there may be other uses for the 
current MSS, I added a macro, tcp_mss(pcb), that does just this.

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

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