public void BroadCast(Message msg) { ChatroomServer server = ChatroomServer.GetSingleton(); MessageListener[] listeners = server.GetClients(); foreach (MessageListener listener in listeners) { /// a oneway call, no answer! listener.NotifyMessage(msg); } }
public void UnregisterMe(String userName) { ChatroomServer server = ChatroomServer.GetSingleton(); server.RemoveClient(userName); }
public void RegisterMe(MessageListener listener, String forUser) { ChatroomServer server = ChatroomServer.GetSingleton(); server.AddClient(listener, forUser); }