TsgcWebSocketHTTPServerProperties › Port

Port Property

TCP port on which the server accepts incoming HTTP and WebSocket connections.

Syntax

public int Port { get; set; }

Default Value

80

Remarks

Set Port before activating the server. Any value between 1 and 65535 is accepted, but ports below 1024 normally require elevated privileges on Unix and firewall rules on Windows. When the server listens on several endpoints use Bindings instead; assigning Port is equivalent to a single binding on 0.0.0.0. If you change Port after stopping the server, call Bindings.Clear() first so the previous handle is released.

Example


oServer = new TsgcWebSocketHTTPServer();
oServer.Port = 8080;
oServer.Active = true;

Back to Properties