TsgcWebSocketLoadBalancerServer › Methods › Start
Starts the load balancer from a secondary thread so the calling thread is not blocked while bindings are opened.
procedure Start;
Start spawns an internal worker thread that sets Active := True, so the caller (typically the main UI thread) returns immediately instead of freezing while the load balancer binds to its configured ports. The server is not guaranteed to be listening when Start returns; subscribe to OnStartup to be notified once the load balancer is accepting connections. Set Port and any Bindings before calling Start so that backup servers can register with the load balancer. Use the Active property directly if you prefer a synchronous start that runs on the calling thread.
oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.Port := 80;
oServer.Start();