add Frame.MaxLength and implement it for currently needed frames

This commit is contained in:
Lucas Clemente
2016-04-20 15:06:10 +02:00
parent 93cea4f5de
commit 6be70bc29c
7 changed files with 70 additions and 1 deletions

View File

@@ -88,3 +88,8 @@ func (f *StreamFrame) Write(b *bytes.Buffer) error {
b.Write(f.Data)
return nil
}
// MaxLength of a written frame
func (f *StreamFrame) MaxLength() int {
return 1 + 4 + 8 + 2 + 1
}