← All compilation units

Flyology.HTTP.Server.HTTP_2

Description

Serves multiplexed HTTP/2 streams through the high-level application exchange API. The owning connection may be plaintext prior knowledge or an ALPN-negotiated TLS connection.

App_Context

type App_Context is limited private;

Handle

procedure Handle
(Context : in out App_Context;
X       : in out Flyology.HTTP.Server.Applications.Exchange)
Parameters
Context
X

Maximum_Concurrent_Streams

Maximum_Concurrent_Streams : constant Positive := 32;

Maximum active streams admitted on one server connection.

Serve

procedure Serve
  (Context            : in out App_Context;
   Channel            : in out Flyology.IO.Connections.Connection;
   Peer               : Flyology.IO.Sockets.Endpoint;
   Timeout            : Duration := 30.0;
   Max_Connection_Age : Duration := 300.0;
   Token              : access Flyology.Cancellation.Token := null;
   Scheme             : Flyology.HTTP.Origin_Scheme :=
     Flyology.HTTP.Plain_HTTP)

Validate the client preface and serve streams until peer closure, cancellation, connection failure, or the configured age bound. Each admitted stream invokes Handle in a lightweight task; application body and response calls retain synchronous deadline and backpressure semantics.

Parameters
Context

Shared application context

Channel

Sole owning plaintext or TLS Flyology connection

Peer

Connected peer endpoint

Timeout

Per-stream application deadline

Max_Connection_Age

Connection deadline; negative is unlimited

Token

Optional connection cancellation source

Scheme

Origin scheme used to receive streams on this connection