TsgcWebSocketLoadBalancerServer › Properties › Active
Starts or stops the load balancer, opening the listening sockets that accept downstream clients and backend TsgcWebSocketServer registrations.
property Active: Boolean read GetActive write SetActive default False;
False
Set Active to True to make the load balancer start listening on the configured Port (and any additional Bindings). Once listening, downstream clients connect to the load balancer just as they would to a plain TsgcWebSocketServer, while backend servers register themselves through their own LoadBalancer client and become routing targets. Setting Active back to False closes all downstream client sessions and unregisters every backend. Call Bindings.Clear() before restarting on a different port to discard the previous handles.
oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.Port := 80;
oServer.Active := true;