TCustomHttpSysServer Class
Base class for the HTTP.sys server, a Windows-only HTTP server built on top of the operating system HTTP Server API (HTTP.sys).
Remarks
The server hosts one or more THttpServerModule instances, added through AddModule or the underlying Dispatcher, and routes each incoming request to the matching module. Requests are processed on a thread pool. Register the modules, then call Start to begin listening and Stop to shut down. Use THttpSysServer for the concrete server class.
Syntax
Unit: Sparkle.HttpSys.Server
TCustomHttpSysServer = class(TObject);
Constructors
| Name | Description |
|---|---|
| Create | Creates a new HTTP.sys server instance with an empty module list. |
Methods
| Name | Description |
|---|---|
| AddModule | Registers an HTTP server module with the server, so its requests are dispatched to it. |
| Start | Starts the server, registering the URL prefixes of the added modules and beginning to listen for and process incoming requests. |
| Stop | Stops the server, ceasing to listen for requests and waiting for in-progress requests to finish. |
Properties
| Name | Description |
|---|---|
| Dispatcher | The dispatcher that holds the registered modules and routes each request to the matching one. |
| IsRunning | Indicates whether the server is currently listening for requests. |
| KeepHostInUrl​Prefixes | Indicates whether the host name of each module base URI is kept when building the HTTP.sys URL prefixes. |
| LogEngine | Gets or sets the log engine used to capture the server (and its dispatcher) error and diagnostic messages. |