fix splitting of STREAM frames for IETF QUIC

Move splitting of STREAM frames from the quic package to the wire
package.
This commit is contained in:
Marten Seemann
2018-02-05 11:50:36 +08:00
parent 5974c6c113
commit 80969de93f
39 changed files with 248 additions and 157 deletions

View File

@@ -42,8 +42,8 @@ func (f *MaxDataFrame) Write(b *bytes.Buffer, version protocol.VersionNumber) er
return nil
}
// MinLength of a written frame
func (f *MaxDataFrame) MinLength(version protocol.VersionNumber) protocol.ByteCount {
// Length of a written frame
func (f *MaxDataFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
if !version.UsesIETFFrameFormat() { // writing this frame would result in a gQUIC WINDOW_UPDATE being written, which is longer
return 1 + 4 + 8
}