WebSocketServer.CardServer.BroadcastClientList C# (CSharp) Method

BroadcastClientList() public method

Sends the most recent client list to all of the clients.
public BroadcastClientList ( ) : void
return void
        public void BroadcastClientList()
        {
            List<JObject> ClientList = new List<JObject>();
            foreach (var c in Clients)
            {
                ClientList.Add(JObject.FromObject(c.Info));
            }

            BroadcastMessage(null, "ClientList", new JProperty("Clients", ClientList.ToArray()));

            // Whenever we broadcast the client list, also re-broadcast the game state (for UI updates).
            BroadcastGameState();
        }