blob: a3c77ccef120a297b8d73eceac8595cfc74c283a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.IO;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Http.Features;
/// <summary>
/// Provides access to server upgrade features.
/// </summary>
public interface IHttpUpgradeFeature
{
/// <summary>
/// Indicates if the server can upgrade this request to an opaque, bidirectional stream.
/// </summary>
bool IsUpgradableRequest { get; }
/// <summary>
/// Attempt to upgrade the request to an opaque, bidirectional stream. The response status code
/// and headers need to be set before this is invoked. Check <see cref="IsUpgradableRequest"/>
/// before invoking.
/// </summary>
/// <returns></returns>
Task<Stream> UpgradeAsync();
}
|