[Top][All Lists]

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

[lwip-users] Re: Sending too slow.

From: Kelvin Lawson
Subject: [lwip-users] Re: Sending too slow.
Date: Tue, 12 Sep 2006 16:28:33 +0100
User-agent: Thunderbird (Windows/20060719)

Hi Mateusz,

Have you tried setting TCP_NODELAY?

According to do_write() in api_msg.c:

      /* This is the Nagle algorithm: inhibit the sending of new TCP
   segments when new outgoing data arrives from the user if any
   previously transmitted data on the connection remains
   unacknowledged. */
if(err == ERR_OK && (msg->conn->pcb.tcp->unacked == NULL || (msg->conn->pcb.tcp->flags & TF_NODELAY)) ) {

I'm not sure that this is correct - it seems to be doing only part of the Nagle algorithm. As I understand it, it should buffer up any outgoing data until all outstanding data is acked, but also permit a send when a full packets' worth of data is ready to send. Judging from the statement above, we do wait for outstanding data to be acked, but don't permit a send when a full packet's worth is ready.


Mateusz Plocinski wrote:
I'm currently working on building audioserver based on AT91SAM7X256 
microcontroller and freertos+lwip stack.
I'm new to lwIP and I encountered one problem while sending packets. When I send a frame (for example 32 KB), lwip sends it as 1.5KB packets and thats normal for TCPIP. But every packet it waits for acknowledgement from client (PC, WinXP). And PC sends it after 200ms!
I have to send about 100KB per second or more and waiting for ack 200ms is not 
possible. As far as I know, I have a right to send the whole window size 
(windows XP sends 65KB window requests) without waiting for ack.
My question: is it possible to make lwIP stack send packets faster without 
waiting for ack every single packet?

We, at our company have written a stack for AVR atmega128 which is able to send 
about 16mbits/s without problem (ack's come every few packets but Windows sends 
them much faster than every 200ms when it gets more data). But this stack is 
buggy and I would like to use lwIP on ARM7)
Can you tell me if fast sending is possible under lwIP or if this is only 
developed for slow, every-packet-acked connection?
Please help ;]

Mateusz Plocinski

reply via email to

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