-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions
Milestone
Description
How should we be validating these limits?
runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs
Lines 29 to 43 in eab397d
| /// <summary> | |
| /// Limit on the number of bidirectional streams the peer connection can create | |
| /// on an accepted connection. | |
| /// Default is 100. | |
| /// </summary> | |
| // TODO consider constraining these limits to 0 to whatever the max of the QUIC library we are using. | |
| public long MaxBidirectionalStreams { get; set; } = 100; | |
| /// <summary> | |
| /// Limit on the number of unidirectional streams the peer connection can create | |
| /// on an accepted connection. | |
| /// Default is 100. | |
| /// </summary> | |
| // TODO consider constraining these limits to 0 to whatever the max of the QUIC library we are using. | |
| public long MaxUnidirectionalStreams { get; set; } = 100; |
How do we get notified that a connection's stream limit has changed(MAX_STREAMS frame event)? This is required for HTTP/3
runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs
Lines 89 to 97 in eab397d
| /// <summary> | |
| /// Gets the maximum number of bidirectional streams that can be made to the peer. | |
| /// </summary> | |
| public long GetRemoteAvailableUnidirectionalStreamCount() => _provider.GetRemoteAvailableUnidirectionalStreamCount(); | |
| /// <summary> | |
| /// Gets the maximum number of unidirectional streams that can be made to the peer. | |
| /// </summary> | |
| public long GetRemoteAvailableBidirectionalStreamCount() => _provider.GetRemoteAvailableBidirectionalStreamCount(); |
runtime/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http3Connection.cs
Lines 235 to 256 in eab397d
| // TODO: how do we get this event? | |
| private void OnMaximumStreamCountIncrease(long newMaximumStreamCount) | |
| { | |
| lock (SyncObj) | |
| { | |
| if (newMaximumStreamCount <= _maximumRequestStreams) | |
| { | |
| return; | |
| } | |
| _requestStreamsRemaining += (newMaximumStreamCount - _maximumRequestStreams); | |
| _maximumRequestStreams = newMaximumStreamCount; | |
| while (_requestStreamsRemaining != 0 && _waitingRequests.TryDequeue(out TaskCompletionSourceWithCancellation<bool> tcs)) | |
| { | |
| if (tcs.TrySetResult(true)) | |
| { | |
| --_requestStreamsRemaining; | |
| } | |
| } | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
area-System.Net.QuicenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additions