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:[email protected]] Im Auftrag
von Sergio R. Caprile
Gesendet: Friday, June 30, 2017 3:24 PM
An: [email protected]
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
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users