private async void HandleGlobalMessageSendAsync(Client client, MessageData messageData) { Console.WriteLine("Handling Global Send."); Client curClient = null; // Must do the operation async because an action is performed on each // client. This may take a long time if there are many clients. await Task.Factory.StartNew(() => { while ((curClient = ClientStore.NextClient()) != null) { if (curClient.ClientHandle == client.ClientHandle) { continue; } var res = CliServLib.MessageServer.SendMessageAsync(curClient, messageData); if (res.Result.Failure) { Console.WriteLine("There is a problem sending data out to the client."); } } }); }