implement sender side behavior for RESET_STREAM_AT (#5242)

* improve existing send stream test

* implement sender side behavior for RESET_STREAM_AT

* refactor send stream cancelation and shutdown error handling

* correctly deal with 0-RTT corner case
This commit is contained in:
Marten Seemann
2025-06-28 11:44:47 +08:00
committed by GitHub
parent b2f24318af
commit a2926a3603
10 changed files with 864 additions and 138 deletions

View File

@@ -17,9 +17,10 @@ import (
type mockStream struct {
id protocol.StreamID
closed bool
closeErr error
sendWindow protocol.ByteCount
closed bool
closeErr error
sendWindow protocol.ByteCount
supportsResetStreamAt bool
}
func (s *mockStream) closeForShutdown(err error) {
@@ -31,6 +32,10 @@ func (s *mockStream) updateSendWindow(limit protocol.ByteCount) {
s.sendWindow = limit
}
func (s *mockStream) enableResetStreamAt() {
s.supportsResetStreamAt = true
}
func TestStreamsMapIncomingGettingStreams(t *testing.T) {
t.Run("client", func(t *testing.T) {
testStreamsMapIncomingGettingStreams(t, protocol.PerspectiveClient, protocol.FirstIncomingUniStreamClient)