TsgcWebSocketLoadBalancerServerProperties › Port

Port Property

TCP port on which the load balancer accepts incoming WebSocket/HTTP clients and backend server registrations.

Syntax

property Port: Integer read GetPort write _SetPort;

Default Value

80

Remarks

Set Port before activating the load balancer. Any value between 1 and 65535 is accepted, but ports below 1024 normally require elevated privileges on Unix and firewall rules on Windows. Both downstream clients and registering backend TsgcWebSocketServer instances must be configured to connect to this port (the backend uses its own LoadBalancer.Port to match). When the load balancer must listen 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, call Bindings.Clear() first so the previous handle is released.

Example


oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.Port := 8080;
oServer.Active := true;

Back to Properties