WebBroker + WebSockets + HTTP/2
Cross-platform WebBroker / DataSnap host that also accepts native WebSocket upgrades and HTTP/2 streams on the same TLS port.
Cross-platform WebBroker / DataSnap host that also accepts native WebSocket upgrades and HTTP/2 streams on the same TLS port.
Cross-platform sibling of TsgcWSHTTPWebBrokerBridgeServer with HTTP/2 framing on top — ALPN h2 negotiation handles the upgrade path, your WebBroker handlers stay the same.
TsgcWSHTTP2WebBrokerBridgeServer
Windows, macOS, Linux, iOS, Android
Enterprise
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;
WebBroker / DataSnap on the OpenSSL Indy stack with HTTP/2 framing — one TLS endpoint, three protocols.
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.
Multiple HTTP/2 streams share one TCP connection — a single browser tab can issue dozens of REST calls in parallel without HOL blocking.
Each HTTP/2 request is decoded and replayed through the WebBroker pipeline, so existing TWebModule, DataSnap REST and RAD Server handlers work without changes.
Set Specifications.RFC6455 := True to keep WebSocket upgrades on the same port. Bind OnConnect / OnMessage for live channels.
Cross-platform OpenSSL TLS. For Windows-only deployments with kernel-mode TLS use the TsgcWSServer_HTTPAPI_WebBrokerBridge sibling on HTTP.SYS.
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.
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. | Open | |
| Demo Project — Demos\40.DataSnap\Server_Indy_HTTP2 Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |