WebBroker + WebSockets + HTTP/2

Cross-platform WebBroker / DataSnap host that also accepts native WebSocket upgrades and HTTP/2 streams on the same TLS port.

TsgcWSHTTP2WebBrokerBridgeServer

Cross-platform sibling of TsgcWSHTTPWebBrokerBridgeServer with HTTP/2 framing on top — ALPN h2 negotiation handles the upgrade path, your WebBroker handlers stay the same.

Component class

TsgcWSHTTP2WebBrokerBridgeServer

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Enterprise

Configure TLS, set HTTP/2, listen

Mount your TWebModule, configure SSLOptions and Specifications.HTTP2, then Active := True — HTTP/1.1, HTTP/2 and WebSocket all share the same TLS endpoint.

uses
  sgcWebSocket, sgcWebSocket_DataSnap, WebReq, WebModuleUnit1;

var
  Server: TsgcWSHTTP2WebBrokerBridgeServer;
begin
  if WebRequestHandler <> nil then
    WebRequestHandler.WebModuleClass := WebModuleClass;

  Server := TsgcWSHTTP2WebBrokerBridgeServer.Create(nil);
  Server.Port := 443;
  Server.SSL  := True;
  Server.SSLOptions.CertFile := 'cert.pem';
  Server.SSLOptions.KeyFile  := 'key.pem';
  Server.Specifications.HTTP   := True;
  Server.Specifications.HTTP2  := True;
  Server.Specifications.RFC6455 := True;

  Server.Active := True;
end;

What's inside

WebBroker / DataSnap on the OpenSSL Indy stack with HTTP/2 framing — one TLS endpoint, three protocols.

ALPN-driven dispatch

During the TLS handshake the server advertises http/1.1 and h2; the client picks one. WebSocket upgrades still flow over the HTTP/1.1 path.

HTTP/2 multiplexing

Multiple HTTP/2 streams share one TCP connection — a single browser tab can issue dozens of REST calls in parallel without HOL blocking.

WebBroker handlers unchanged

Each HTTP/2 request is decoded and replayed through the WebBroker pipeline, so existing TWebModule, DataSnap REST and RAD Server handlers work without changes.

WebSocket coexistence

Set Specifications.RFC6455 := True to keep WebSocket upgrades on the same port. Bind OnConnect / OnMessage for live channels.

TLS via OpenSSL

Cross-platform OpenSSL TLS. For Windows-only deployments with kernel-mode TLS use the TsgcWSServer_HTTPAPI_WebBrokerBridge sibling on HTTP.SYS.

HTTP/3 path

For QUIC-based HTTP/3 use TsgcHTTP3Server directly — pair the two when you want HTTP/2 over TCP for legacy clients and HTTP/3 over QUIC for modern ones.

Specifications & references

Authoritative sources for the protocols this component implements.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Online Help — TsgcWSHTTP2WebBrokerBridgeServer Full property, method and event reference for this component.
Demo Project — Demos\40.DataSnap\Server_Indy_HTTP2 Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Ready to Add HTTP/2 to Your DataSnap Server?

Download the free trial and serve HTTP/1.1, HTTP/2 and WebSocket from a single Delphi DataSnap host.