I'm trying to understand the mechanisms under TCP_WRITE_FLAG_MORE,
tcp_write() and tcp_output(). I'm using raw API.
First of all, I couldn't understand if tcp_output() is useful or not. I
understood tcp_output() *really* outputs unsent data, pushing all data
to netif driver. Here it's not clear:
* if unacked data (data already sent but not yet acknlowedged) is sent
too;
* what happens if data in the output buffer is bigger than what netif
driver could accept in its sending function (maybe a well written
application checks tcp_sndbuf() before writing output data, so this
event never happens).
For example:
tcp_write(...)
tcp_write(...)
tcp_write(...)
tcp_output()
Is tcp_output() really needed? It seems data are send even without
calling tcp_output().
Another question is the correspondence between tcp_write() calls and
output TCP segments, IP packets and Ethernet frames. Are three TCP
segments, three IP packets and three Ethernet frames generated? Does
lwip try to compact output data in a single TCP segment, IP packet and
Ethernet frame?
Another question is about TCP_WRITE_FLAG_MORE flag. I understood this
flag should be set in all tcp_write() except the last. However it seems
it works with and without that flag in sending data.
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users