mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
move more stream ID logic to the protocol package
This commit is contained in:
parent
05ecf9bc02
commit
e8de94485c
4 changed files with 56 additions and 78 deletions
|
@ -330,19 +330,19 @@ var _ = Describe("Streams Map", func() {
|
|||
|
||||
Context("sending MAX_STREAM_ID frames", func() {
|
||||
It("sends MAX_STREAM_ID frames for bidirectional streams", func() {
|
||||
_, err := m.GetOrOpenReceiveStream(ids.firstIncomingBidiStream + 4*10)
|
||||
_, err := m.GetOrOpenReceiveStream(ids.firstIncomingBidiStream)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
mockSender.EXPECT().queueControlFrame(&wire.MaxStreamIDFrame{
|
||||
StreamID: protocol.MaxBidiStreamID(maxBidiStreams, perspective) + 4,
|
||||
StreamID: ids.firstIncomingBidiStream + 4*maxBidiStreams,
|
||||
})
|
||||
Expect(m.DeleteStream(ids.firstIncomingBidiStream)).To(Succeed())
|
||||
})
|
||||
|
||||
It("sends MAX_STREAM_ID frames for unidirectional streams", func() {
|
||||
_, err := m.GetOrOpenReceiveStream(ids.firstIncomingUniStream + 4*10)
|
||||
_, err := m.GetOrOpenReceiveStream(ids.firstIncomingUniStream)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
mockSender.EXPECT().queueControlFrame(&wire.MaxStreamIDFrame{
|
||||
StreamID: protocol.MaxUniStreamID(maxUniStreams, perspective) + 4,
|
||||
StreamID: ids.firstIncomingUniStream + 4*maxUniStreams,
|
||||
})
|
||||
Expect(m.DeleteStream(ids.firstIncomingUniStream)).To(Succeed())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue