TsgcWebSocketServer_HTTPAPIProperties › Port

Port Property

TCP port that, combined with Host, forms the URL the http.sys driver reserves for the server.

Syntax

public int Port { get; set; }

Default Value

80

Remarks

When Host has a value the server registers http(s)://Host:Port/ with the kernel driver on activation. Choose 443 (or any other TLS port) and set SSL to True for secure connections. If the same process must listen on multiple endpoints (several IP addresses or both HTTP and HTTPS simultaneously), clear Host and register every pair through Bindings.NewBinding instead. Changing Port while the server is running has no immediate effect; toggle Active to re-register.

Example


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

Back to Properties