WebBroker + WebSockets
Indy-based WebBroker / DataSnap host that also accepts native WebSocket upgrades on the same port. Cross-platform — runs on Windows, Linux and macOS.
Indy-based WebBroker / DataSnap host that also accepts native WebSocket upgrades on the same port. Cross-platform — runs on Windows, Linux and macOS.
Bridges Embarcadero's WebBroker pipeline (TWebModule, DataSnap REST, RAD Server) onto the cross-platform Indy server, with native WebSocket upgrade handling on the same listener.
TsgcWSHTTPWebBrokerBridgeServer
Windows, macOS, Linux, iOS, Android
Enterprise
Mount your TWebModule via WebRequestHandler, configure the bridge server's port and SSL, attach OnConnect for the WebSocket upgrade path, then Active := True.
uses
sgcWebSocket, sgcWebSocket_DataSnap, WebReq, WebModuleUnit1;
var
Server: TsgcWSHTTPWebBrokerBridgeServer;
begin
if WebRequestHandler <> nil then
WebRequestHandler.WebModuleClass := WebModuleClass;
Server := TsgcWSHTTPWebBrokerBridgeServer.Create(nil);
Server.Port := 8080;
// the same server accepts WebSocket upgrades
Server.OnMessage := procedure(Connection: TsgcWSConnection;
const aText: string)
begin
Connection.WriteData('echo: ' + aText);
end;
Server.Active := True;
end;
A pure-Delphi cross-platform WebBroker host — works on Linux as well as Windows, including DataSnap REST and RAD Server endpoints.
Inbound HTTP requests run through the standard WebRequestHandler / WebModule chain, so existing DataSnap REST and TWebModule handlers work unchanged.
WebSocket upgrades are handled in the same component — OnMessage, OnBinary, OnConnect, OnDisconnect are all available alongside HTTP.
Configure SSLOptions (CertFile / KeyFile / RootCertFile) for HTTPS — the same TLS settings cover both HTTP and WebSocket traffic.
Runs anywhere Indy runs — Windows, Linux 64, macOS — making it the natural pick for DataSnap services that need to deploy beyond Windows.
CORS preflight handling, route-based redirects and IP filtering are exposed as properties — no need to hand-roll them in every WebModule.
For the same WebBroker stack with HTTP/2 support use the sibling TsgcWSHTTP2WebBrokerBridgeServer — identical surface, plus HTTP/2 framing.
Authoritative sources for the protocols this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — TsgcWSHTTPWebBrokerBridgeServer Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\40.DataSnap\Server_Indy_HTTP 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 |