TsgcWebSocketServer_HTTPAPIProperties › Host

Host Property

Hostname or IP address used to build the URL registered with the http.sys driver.

Syntax

public string Host { get; set; }

Default Value

'127.0.0.1'

Remarks

When Host has a value the server combines it with Port to register a single URL (for example http://127.0.0.1:80/) at start-up. If you need to listen on several IP addresses or hostnames simultaneously, clear Host, call Bindings.Clear and register each endpoint with Bindings.NewBinding. Use + as a wildcard host to accept traffic on every local interface, or a specific IP / DNS name to restrict the listener. Host changes take effect the next time Active is toggled.

Example


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

Back to Properties