add DataLen function to StreamFrame

This commit is contained in:
Marten Seemann
2016-06-01 09:23:26 +07:00
parent 981d4e7fb8
commit 2f49a9525a
7 changed files with 38 additions and 24 deletions

View File

@@ -203,3 +203,8 @@ func (f *StreamFrame) MinLength() (protocol.ByteCount, error) {
return length + 1, nil
}
// DataLen gives the length of data in bytes
func (f *StreamFrame) DataLen() protocol.ByteCount {
return protocol.ByteCount(len(f.Data))
}