示例#1
0
        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);
            }
        }
示例#2
0
        public void UnregisterMe(String userName)
        {
            ChatroomServer server = ChatroomServer.GetSingleton();

            server.RemoveClient(userName);
        }
示例#3
0
        public void RegisterMe(MessageListener listener, String forUser)
        {
            ChatroomServer server = ChatroomServer.GetSingleton();

            server.AddClient(listener, forUser);
        }