lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Long(er) delay to PC ACK when ser ving images


From: Mateusz Plocinski
Subject: Re: [lwip-users] Long(er) delay to PC ACK when ser ving images
Date: Sat, 07 Oct 2006 01:01:56 +0200

Hi,
I'm not an tcpip expert too, but I've worked with lwip for past few weeks. I 
had exactly the same problem like yours, also using SAM7X256 processor.
I solved the problem changing following thing 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)) ) {
  tcp_output(msg->conn->pcb.tcp);
//      }

As you see, I commented out this if statement. Well, I dont understand why it 
is written that way, and when TF_NODELAY flag is being set (it is probably 
possible to set it for a socket using BSD-style sockets api, but I dont use it).
After commenting this out, everything works fine and now I can send up to 
several megabits per second.
Its true that Windows sends first ACK after about 200ms, but when you send it a 
second packet, it starts to ACK much faster, so it works fine.

Mateusz Plocinski





reply via email to

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