-
I want to force the sending of packets in a specific order and with a specified size in the stream. What I mean is to send certain data units atomically to the server side, instead of having them split into multiple QUIC packets. The size of these atomic packets is usually 1045 bytes and 29 bytes. I read in the document that My code is as follows:
The size of StreamEXBufferFileMeta among them is 1045 bytes, but on the server side, the log is as follows:
The server received 13057 bytes for the first time instead of the 1045 bytes I expected. In addition, the parameters related to the window and the cache queue all use the default values. Do I have an incorrect understanding of how to use the forced flush? Could you please provide some examples of forced flushes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Unfortunately, you cannot force MsQuic to segment data like that. The 'flush' logic is just a hint - nothing actually runs inline so it's still a race condition from your perspective. If you put really long waits after each send then yes, it would likely segment how you want, but be very slow. Bottom line, if you need special boundaries enforced, you need to add framing (i.e. a length before the payload) to split things up on the receive side. |
Beta Was this translation helpful? Give feedback.
Thank you. I have read the discussions. Actually, my problem is the same as that in #3174
It seems that the more convenient way is still to use a completely independent stream for each "application package"?