use STREAM frames from the buffer for sending data

This commit is contained in:
Marten Seemann
2019-09-04 20:24:09 +07:00
parent 039d7ae888
commit 4cfbb2f134
5 changed files with 57 additions and 42 deletions

View File

@@ -7,12 +7,12 @@ import (
var _ = Describe("Pool", func() {
It("gets and puts STREAM frames", func() {
f := getStreamFrame()
f := GetStreamFrame()
putStreamFrame(f)
})
It("panics when putting a STREAM frame with a wrong capacity", func() {
f := getStreamFrame()
f := GetStreamFrame()
f.Data = []byte("foobar")
Expect(func() { putStreamFrame(f) }).To(Panic())
})