HTTP API Server

TsgcWebSocketServer_HTTPAPI — use the Microsoft HTTP Server API (HTTP.SYS) as the kernel-level HTTP transport on Windows. WebSockets, HTTP/1.1 and HTTP/2 in one component, with kernel-mode I/O completion ports for high-concurrency workloads.

TsgcWebSocketServer_HTTPAPI

High-performance WebSocket + HTTP server built on the Windows HTTP Server API (http.sys). Kernel-mode HTTPS termination, no Indy listener, scales further than the standard server on Windows.

Component class

TsgcWebSocketServer_HTTPAPI

Protocol

WebSocket over http.sys — RFC 6455

Platforms

Windows (http.sys kernel driver)

Edition

Enterprise

Drop the component, set a few properties, go

Same OnConnect/OnMessage surface as TsgcWebSocketHTTPServer; binds via http.sys instead of Indy.

uses
  sgcWebSocket_HTTPAPI;

var
  Server: TsgcWebSocketServer_HTTPAPI;
begin
  Server := TsgcWebSocketServer_HTTPAPI.Create(nil);
  Server.Port := 443;
  Server.SSL := True;
  Server.SSLOptions.CertFile := 'server.pem';

  Server.OnConnect    := ServerConnect;
  Server.OnMessage    := ServerMessage;
  Server.OnDisconnect := ServerDisconnect;

  Server.Active := True;
end;

What's inside

27 published properties, 9 methods, 23 events — pulled from the component reference.

Connection

Published properties: Active, Host, Port.

Messaging

Methods: Broadcast, WriteData, Ping.

Reliability

Published properties: HeartBeat, WatchDog, Firewall.

Security

Published properties: Authentication, SSL, SSLOptions.

Lifecycle

Events: OnStartup, OnShutdown, OnBeforeBinding.

Data

Events: OnMessage, OnBinary, OnFragmented.

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.

Demo Project — 02.HTTP\API.Server 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.

Run High-Concurrency Servers on Windows

Download the free trial and switch your Delphi server to the kernel-mode HTTP.SYS transport.