mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 21:27:35 +03:00
rename MaxDataFrame.ByteOffset to MaximumData
This commit is contained in:
parent
00f8028e52
commit
f4519cfd32
16 changed files with 32 additions and 32 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
// A MaxDataFrame carries flow control information for the connection
|
||||
type MaxDataFrame struct {
|
||||
ByteOffset protocol.ByteCount
|
||||
MaximumData protocol.ByteCount
|
||||
}
|
||||
|
||||
// parseMaxDataFrame parses a MAX_DATA frame
|
||||
|
@ -23,18 +23,18 @@ func parseMaxDataFrame(r *bytes.Reader, _ protocol.VersionNumber) (*MaxDataFrame
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
frame.ByteOffset = protocol.ByteCount(byteOffset)
|
||||
frame.MaximumData = protocol.ByteCount(byteOffset)
|
||||
return frame, nil
|
||||
}
|
||||
|
||||
//Write writes a MAX_STREAM_DATA frame
|
||||
func (f *MaxDataFrame) Write(b *bytes.Buffer, version protocol.VersionNumber) error {
|
||||
b.WriteByte(0x10)
|
||||
utils.WriteVarInt(b, uint64(f.ByteOffset))
|
||||
utils.WriteVarInt(b, uint64(f.MaximumData))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Length of a written frame
|
||||
func (f *MaxDataFrame) Length(version protocol.VersionNumber) protocol.ByteCount {
|
||||
return 1 + utils.VarIntLen(uint64(f.ByteOffset))
|
||||
return 1 + utils.VarIntLen(uint64(f.MaximumData))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue