add support for receiving BLOCKED frames

This commit is contained in:
Lucas Clemente
2016-04-27 13:02:00 +02:00
parent 0d6642464d
commit bd67f537c9
5 changed files with 74 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
package frames
import (
"bytes"
"github.com/lucas-clemente/quic-go/protocol"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("BlockedFrame", func() {
Context("when parsing", func() {
It("accepts sample frame", func() {
b := bytes.NewReader([]byte{0x05, 0xEF, 0xBE, 0xAD, 0xDE})
frame, err := ParseBlockedFrame(b)
Expect(err).ToNot(HaveOccurred())
Expect(frame.StreamID).To(Equal(protocol.StreamID(0xDEADBEEF)))
})
})
})