public void SubmitMessage(ChatMessage msg) { foreach (var key in clients.Keys) { try { clients[key].SendMessage(msg); } catch (Exception e) { Console.WriteLine(e); } } }
public void SendMessage(ChatMessage msg) { Console.WriteLine("{0} {1} says: {2}",msg.TimeStamp,msg.Name,msg.Message); }