TsgcWebSocketServer › Events › OnLoadBalancerConnect
Fires when the server connects to the Load Balancer Server.
public event TsgcWSConnectEventHandler OnLoadBalancerConnect;
// delegate void TsgcWSConnectEventHandler(TsgcWSConnection Connection)
—
When LoadBalancer.Enabled is True the server opens a side connection to the Load Balancer Server identified by LoadBalancer.Host and LoadBalancer.Port, in order to broadcast messages across a cluster and publish its own bindings. OnLoadBalancerConnect is raised once that side connection has been established and the server has been registered. The Connection parameter is the TsgcWSConnection against the Load Balancer Server; this event does not fire for regular clients connecting to the server.
void OnLoadBalancerConnect(TsgcWSConnection Connection)
{
Console.WriteLine("#load balancer connected: " + Connection.PeerIP);
}