File: Internal\Http2\Http2StreamOfT.cs
Web Access
Project: src\src\Servers\Kestrel\Core\src\Microsoft.AspNetCore.Server.Kestrel.Core.csproj (Microsoft.AspNetCore.Server.Kestrel.Core)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Hosting.Server.Abstractions;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
 
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2;
 
/// <inheritdoc />
internal sealed class Http2Stream<TContext> : Http2Stream, IHostContextContainer<TContext> where TContext : notnull
{
    private readonly IHttpApplication<TContext> _application;
 
    public Http2Stream(IHttpApplication<TContext> application, Http2StreamContext context)
    {
        Initialize(context);
        _application = application;
    }
 
    public override void Execute()
    {
        KestrelEventSource.Log.RequestQueuedStop(this, AspNetCore.Http.HttpProtocol.Http2);
        ServiceContext.Metrics.RequestQueuedStop(MetricsContext, KestrelMetrics.Http2);
 
        // REVIEW: Should we store this in a field for easy debugging?
        _ = ProcessRequestsAsync(_application);
    }
 
    // Pooled Host context
    TContext? IHostContextContainer<TContext>.HostContext { get; set; }
}