TCP, on the application side, is flow-based, which means there are no packets, but just a sequence of bytes. The kernel can collect several records in the connection before sending it, and the receiving party can make any amount of received data available for each “read” call.
TCP, on the IP side, is a packet. Since standard Ethernet has an MTU (maximum transmission unit) of 1,500 bytes, and both TCP and IP have 20 byte headers, each packet transmitted over Ethernet will transmit 1,460 bytes (or less) of the TCP stream to the other side. 40KB or 80MB of entries from the application here will not make any difference.
How long it takes data to transmit depends on how and where you measure it. A 40 KB record is likely to return immediately after this amount of data is simply deleted in the TCP “send” window in the kernel. Recording to 80 MB will be blocked, waiting until all this is transferred (well, everything except the last 64 KB, which will correspond to the expectation in the window).
TCP baud rate also depends on the recipient. It has a “receive window” that contains everything received from a peer but not received by the application. The amount of space available in this window is transferred to the sender with each ACK return, so if it is not quickly freed up by the receiving application, the sender will eventually stop. WireShark can give some information here.
In the end, both methods must be carried over in the same period of time, because the application can easily fill the outgoing window faster than TCP can send it no matter how this data is broken.
I can not talk about the work of QT.
source share