-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTTP/3: Avoid per-request cancellation token allocations
- Loading branch information
Showing
11 changed files
with
248 additions
and
141 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/Servers/Connections.Abstractions/src/Features/IStreamClosedFeature.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Threading.Tasks; | ||
using System; | ||
|
||
namespace Microsoft.AspNetCore.Connections.Features; | ||
|
||
/// <summary> | ||
/// Represents the close action for a stream. | ||
/// </summary> | ||
public interface IStreamClosedFeature | ||
{ | ||
/// <summary> | ||
/// Registers a callback to be invoked when a stream is closed. | ||
/// If the stream is already in a closed state, the callback will be run immediately. | ||
/// </summary> | ||
/// <param name="callback">The callback to invoke after the stream is closed.</param> | ||
/// <param name="state">The state to pass into the callback.</param> | ||
void OnClosed(Action<object?> callback, object? state); | ||
} |
2 changes: 2 additions & 0 deletions
2
src/Servers/Connections.Abstractions/src/PublicAPI.Unshipped.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
#nullable enable | ||
Microsoft.AspNetCore.Connections.Features.IStreamClosedFeature | ||
Microsoft.AspNetCore.Connections.Features.IStreamClosedFeature.OnClosed(System.Action<object?>! callback, object? state) -> void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.