protected override TcpSession CreateSession() { ChatSession newSession = new ChatSession(this); sessions.Add(newSession); return(newSession); }
public static void Multicast(ChatSession origin, string text) { foreach (ChatSession session in sessions) { if (session != origin) { session.SendAsync(text); } } }