TsgcWebSocketServer_HTTPAPIProperties › Active

Active Property

Starts or stops the HTTP.sys listener, registering the configured URL with the Windows kernel driver.

Syntax

public bool Active { get; set; }

Default Value

False

Remarks

Set Active to True to register the URL built from Host/Port (or the entries in Bindings) with the http.sys driver and start accepting connections; setting it back to False unregisters the URL and stops the listener. By default the component requires the process to run with administrative rights because URL reservation needs elevated privileges. If the URL has already been reserved externally (for example with netsh http add urlacl), disable BindingOptions.ConfigureSSLCertificate so the server can start without Admin.

Example


oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 80;
oServer.Active = true;

Back to Properties