HTTP/3 Server Component — sgcQUIC | eSeGeCe

HTTP/3 Server

TsgcHTTP3Server — an HTTP/3 server (RFC 9114) that serves requests over QUIC. It descends from TsgcQUICServer, binds a UDP port, loads a certificate and key, and raises an event for every request, with server push, WebTransport sessions and datagrams, in Delphi, C++ Builder and .NET.

TsgcHTTP3Server

Bind a UDP port, load a PEM certificate and key, and answer each request in OnH3Request. QPACK, server push and WebTransport are built in. Built on the native OpenSSL 3.5 QUIC engine.

Component class

TsgcHTTP3Server

Protocol

HTTP/3 (RFC 9114) over QUIC

Family

HTTP/3

Languages

Delphi, C++ Builder, .NET

An HTTP/3 server in a few lines

The server binds a UDP port, loads a certificate and key, and raises OnH3Request for every request. WebTransport sessions arrive through OnWebTransportSession.

uses
  sgcHTTP3_Server;

var
  oServer: TsgcHTTP3Server;
begin
  oServer := TsgcHTTP3Server.Create(nil);
  oServer.Port := 443;
  oServer.QUICOptions.SSLOptions.CertFile := 'cert.pem';
  oServer.QUICOptions.SSLOptions.KeyFile  := 'key.pem';

  oServer.OnH3Request := OnH3RequestHandler;   // fill the response here
  oServer.Active := True;
end;
// includes: sgcHTTP3_Server.hpp

TsgcHTTP3Server *oServer = new TsgcHTTP3Server(NULL);
oServer->Port = 443;
oServer->QUICOptions->SSLOptions->CertFile = "cert.pem";
oServer->QUICOptions->SSLOptions->KeyFile  = "key.pem";

oServer->OnH3Request = OnH3RequestHandler;   // fill the response here
oServer->Active = true;
using esegece.sgcWebSockets;

var oServer = new TsgcHTTP3Server();
oServer.Port = 443;
oServer.QUICOptions.SSLOptions.CertFile = "cert.pem";
oServer.QUICOptions.SSLOptions.KeyFile  = "key.pem";

oServer.OnH3Request += OnH3RequestHandler;   // fill the response here
oServer.Active = true;

Key properties & methods

The members you reach for most often.

Listener

Port and Active bind and release the UDP listener; the server descends from TsgcQUICServer.

TLS

QUICOptions.SSLOptions.CertFile and KeyFile load the PEM certificate and private key for the TLS 1.3 handshake.

Requests

OnH3Request fires per request with the parsed request; the application fills the response, and can push additional responses from inside the handler.

Tunnels & datagrams

OnH3TunnelData and TunnelSend(aConnection, …) drive Extended CONNECT tunnels; SendDatagram sends an unreliable datagram.

WebTransport

OnWebTransportSession hands you a WebTransport session (RFC 9220) with its own QUIC streams on the builtin engine.

Events

OnH3Connect, OnH3Disconnect and OnH3Exception report the connection lifecycle and errors.

Keep exploring

Online HelpFull API reference and usage guide for sgcQUIC.
All sgcQUIC ComponentsBrowse the full feature matrix of all four components.
Download Free TrialStand up an HTTP/3 server and hit it with any HTTP/3 client.
PricingSingle, Team and Site licenses with full source code.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Ready to Get Started?

Download the free trial and serve HTTP/3 from Delphi, C++ Builder and .NET.