Пример #1
0
        /// <summary>
        /// Start the lobby server link.
        /// </summary>

        public override void Start()
        {
            base.Start();

            if (mUdp == null)
            {
                mUdp = new UdpProtocol();
                mUdp.Start();
            }
        }
Пример #2
0
 /// <summary>
 /// Start listening for incoming UDP packets on the specified listener port.
 /// </summary>
 public override bool Start(int listenPort)
 {
     Stop();
     mUdp = new UdpProtocol();
     if (!mUdp.Start(listenPort)) return false;
     #if STANDALONE
     Console.WriteLine("UDP Lobby Server started on port " + listenPort);
     #endif
     mThread = new Thread(ThreadFunction);
     mThread.Start();
     return true;
 }
Пример #3
0
        /// <summary>
        /// Start the lobby server link.
        /// </summary>

        public override void Start()
        {
            base.Start();

#if FORCE_EN_US
            Tools.SetCurrentCultureToEnUS();
#endif
            if (mUdp == null)
            {
                mUdp = new UdpProtocol("Lobby Link");
                mUdp.Start();
            }
        }
Пример #4
0
 /// <summary>
 /// Start listening for incoming UDP packets on the specified listener port.
 /// </summary>
 public override bool Start(int listenPort)
 {
     Stop();
     mUdp = new UdpProtocol();
     if (!mUdp.Start(listenPort)) return false;
     #if STANDALONE
     Tools.Print("UDP Lobby Server started on port " + listenPort + " using interface " +
     (UdpProtocol.defaultNetworkInterface ?? IPAddress.Any));
     #endif
     mThread = new Thread(ThreadFunction);
     mThread.Start();
     return true;
 }
Пример #5
0
        /// <summary>
        /// Stop listening for incoming packets.
        /// </summary>

        public override void Stop()
        {
            if (mThread != null)
            {
                mThread.Abort();
                mThread = null;
            }

            if (mUdp != null)
            {
                mUdp.Stop();
                mUdp = null;
            }
            mList.Clear();
        }
Пример #6
0
        /// <summary>
        /// Start listening for incoming UDP packets on the specified listener port.
        /// </summary>

        public override bool Start(int listenPort)
        {
            Stop();
            mUdp = new UdpProtocol("Lobby Server");
            if (!mUdp.Start(listenPort, UdpProtocol.defaultBroadcastInterface))
            {
                return(false);
            }
#if STANDALONE
            Tools.Print("UDP Lobby Server started on port " + listenPort + " using interface " + UdpProtocol.defaultNetworkInterface);
#endif
            mThread = new Thread(ThreadFunction);
            mThread.Start();
            return(true);
        }
Пример #7
0
        /// <summary>
        /// Start listening for incoming UDP packets on the specified listener port.
        /// </summary>

        public override bool Start(int listenPort)
        {
            Stop();
            mUdp = new UdpProtocol();
            if (!mUdp.Start(listenPort))
            {
                return(false);
            }
#if STANDALONE
            Console.WriteLine("UDP Lobby Server started on port " + listenPort);
#endif
            mThread = new Thread(ThreadFunction);
            mThread.Start();
            return(true);
        }
Пример #8
0
        /// <summary>
        /// Stop listening for incoming packets.
        /// </summary>

        public override void Stop()
        {
            if (mThread != null)
            {
                mThread.Interrupt();
                mThread.Join();
                mThread = null;
            }

            if (mUdp != null)
            {
                mUdp.Stop();
                mUdp = null;
            }
            mList.Clear();
        }
Пример #9
0
        /// <summary>
        /// Start listening for incoming UDP packets on the specified listener port.
        /// </summary>

        public override bool Start(int listenPort)
        {
            Stop();
            mUdp = new UdpProtocol();
            if (!mUdp.Start(listenPort))
            {
                return(false);
            }
#if STANDALONE
            Console.WriteLine("UDP Lobby Server started on port " + listenPort + " using interface " +
                              (UdpProtocol.defaultNetworkInterface ?? IPAddress.Any));
#endif
            mThread = new Thread(ThreadFunction);
            mThread.Start();
            return(true);
        }
Пример #10
0
        /// <summary>
        /// Stop listening for incoming packets.
        /// </summary>

        public override void Stop()
        {
            if (mThread != null)
            {
                mThread.Interrupt();
                mThread.Join();
                mThread = null;
            }

            if (mUdp != null)
            {
                mUdp.Stop();
                mUdp = null;

                Tools.LoadList(banFilePath, mBan);
            }
            mList.Clear();
        }
Пример #11
0
        /// <summary>
        /// Start listening for incoming UDP packets on the specified listener port.
        /// </summary>

        public override bool Start(int listenPort)
        {
            Stop();

            Tools.LoadList(banFilePath, mBan);

#if FORCE_EN_US
            Tools.SetCurrentCultureToEnUS();
#endif
            mUdp = new UdpProtocol("Lobby Server");
            if (!mUdp.Start(listenPort, UdpProtocol.defaultBroadcastInterface))
            {
                return(false);
            }
#if STANDALONE
            Tools.Print("Bans: " + mBan.Count);
            Tools.Print("UDP Lobby Server started on port " + listenPort + " using interface " + UdpProtocol.defaultNetworkInterface);
#endif
            mThread = Tools.CreateThread(ThreadFunction);
            mThread.Start();
            return(true);
        }
Пример #12
0
        /// <summary>
        /// Stop listening for incoming packets.
        /// </summary>
        public override void Stop()
        {
            if (mThread != null)
            {
            mThread.Abort();
            mThread = null;
            }

            if (mUdp != null)
            {
            mUdp.Stop();
            mUdp = null;
            }
            mList.Clear();
        }
Пример #13
0
        /// <summary>
        /// Start the lobby server link.
        /// </summary>
        public override void Start()
        {
            base.Start();

            if (mUdp == null)
            {
            mUdp = new UdpProtocol();
            mUdp.Start();
            }
        }