mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
use STREAM frames from the buffer for sending data
This commit is contained in:
parent
039d7ae888
commit
4cfbb2f134
5 changed files with 57 additions and 42 deletions
|
@ -408,8 +408,8 @@ var _ = Describe("Send Stream", func() {
|
|||
mockSender.EXPECT().onHasStreamData(streamID)
|
||||
str.Close()
|
||||
frame, hasMoreData := str.popStreamFrame(1000)
|
||||
Expect(frame).ToNot(BeNil())
|
||||
f := frame.Frame.(*wire.StreamFrame)
|
||||
Expect(f).ToNot(BeNil())
|
||||
Expect(f.Data).To(BeEmpty())
|
||||
Expect(f.FinBit).To(BeTrue())
|
||||
Expect(hasMoreData).To(BeFalse())
|
||||
|
@ -423,8 +423,8 @@ var _ = Describe("Send Stream", func() {
|
|||
str.dataForWriting = []byte("foobar")
|
||||
Expect(str.Close()).To(Succeed())
|
||||
frame, _ := str.popStreamFrame(3 + frameHeaderLen)
|
||||
Expect(frame).ToNot(BeNil())
|
||||
f := frame.Frame.(*wire.StreamFrame)
|
||||
Expect(f).ToNot(BeNil())
|
||||
Expect(f.Data).To(Equal([]byte("foo")))
|
||||
Expect(f.FinBit).To(BeFalse())
|
||||
frame, _ = str.popStreamFrame(100)
|
||||
|
@ -444,8 +444,8 @@ var _ = Describe("Send Stream", func() {
|
|||
mockSender.EXPECT().onHasStreamData(streamID)
|
||||
str.Close()
|
||||
frame, _ := str.popStreamFrame(1000)
|
||||
Expect(frame).ToNot(BeNil())
|
||||
f := frame.Frame.(*wire.StreamFrame)
|
||||
Expect(f).ToNot(BeNil())
|
||||
Expect(f.Data).To(BeEmpty())
|
||||
Expect(f.FinBit).To(BeTrue())
|
||||
frame, hasMoreData := str.popStreamFrame(1000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue