don't add more STREAM frames to a packet if remaining size is too small

This commit is contained in:
Marten Seemann
2017-12-10 13:31:00 +07:00
parent 9b4cdf66fc
commit 4aca4d64b7
3 changed files with 95 additions and 56 deletions

View File

@@ -122,3 +122,9 @@ const ClosedSessionDeleteTimeout = time.Minute
// NumCachedCertificates is the number of cached compressed certificate chains, each taking ~1K space
const NumCachedCertificates = 128
// MinStreamFrameSize is the minimum size that has to be left in a packet, so that we add another STREAM frame.
// This avoids splitting up STREAM frames into small pieces, which has 2 advantages:
// 1. it reduces the framing overhead
// 2. it reduces the head-of-line blocking, when a packet is lost
const MinStreamFrameSize ByteCount = 128