[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Raw TCP Client - wait for ACK after each packet causes
From: |
Adrian Figueroa |
Subject: |
Re: [lwip-users] Raw TCP Client - wait for ACK after each packet causes slowdown |
Date: |
Fri, 30 Jun 2017 13:38:00 +0000 |
I worked on the problem and it is now solved.
The problem:
Only the tcp_sent() callback called the next tcp_write() after the previous
write was finished. Tcp_sent() is probably only triggered by an ACK from the
other side. So, my code waited for the ACK, effectively.
Now, I use tcp_write(), called from a function that runs every few
milliseconds. When there is no data left to write, tcp_output() is called.
Some pseudo-code:
=== Regularly called function ===
Check If data is available
Yes? --> call tcp_write
Yes, but less than TCP_MSS? --> call tcp_write and then tcp_output
No? --> do nothing
Best regards,
Adrian
-----Ursprüngliche Nachricht-----
Von: lwip-users [mailto:address@hidden Im Auftrag von Sergio R. Caprile
Gesendet: Friday, June 30, 2017 3:24 PM
An: address@hidden
Betreff: Re: [lwip-users] Raw TCP Client - wait for ACK after each packet
causes slowdown
Without a _small_ and clear example (I won't browse your entire code) and a
proper capture file I can't help you further. Perhaps someone else jumps in.
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users