示例#1
0
        /// <summary>
        /// Send a server update.
        /// </summary>
        public override void SendUpdate(GameServer server)
        {
            if (!mShutdown)
            {
            mGameServer = server;

            if (mThread == null)
            {
                mThread = new Thread(ThreadFunction);
                mThread.Start();
            }
            }
        }
示例#2
0
        /// <summary>
        /// Send an update to the lobby server. Triggered by the game server.
        /// </summary>
        public virtual void SendUpdate(GameServer gameServer)
        {
            if (!mShutdown)
            {
            mGameServer = gameServer;

            if (mExternal != null)
            {
                long time = DateTime.Now.Ticks / 10000;
                mNextSend = time + 3000;
                mLobby.AddServer(mGameServer.name, mGameServer.playerCount, mInternal, mExternal);
            }
            else if (mThread == null)
            {
                mThread = new Thread(SendThread);
                mThread.Start();
            }
            }
        }