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.

Klasa komponentu

TsgcWSHTTP2WebBrokerBridgeServer

Protokół

HTTP/2 (RFC 9113)

Platformy

Windows, macOS, Linux, iOS, Android

Edycja

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;

Co jest w środku

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.

Specyfikacje i źródła

Autorytatywne źródła protokołów implementowanych przez ten komponent.

Dokumentacja i dema

Bezpośredni link do dokumentacji komponentu, gotowy do uruchomienia projekt demo i pobieranie wersji próbnej.

Pomoc online — TsgcWSHTTP2WebBrokerBridgeServer Pełna dokumentacja właściwości, metod i zdarzeń tego komponentu.
Demo Project — Demos\40.DataSnap\Server_Indy_HTTP2 Gotowy do uruchomienia projekt przykładowy. Dostarczany w pakiecie sgcWebSockets — pobierz wersję próbną poniżej.
Dokument techniczny (PDF) Funkcje, szybki start, przykłady kodu dla Delphi i C++ Builder oraz źródła pierwotne — tylko ten komponent.
Podręcznik użytkownika (PDF) Kompleksowy podręcznik obejmujący każdy komponent biblioteki.

Ready to Add HTTP/2 to Your DataSnap Server?

Pobierz bezpłatną wersję próbną i obsługuj HTTP/1.1, HTTP/2 and WebSocket from a single Delphi DataSnap host.