This class emulates the master.gamespy.com TCP server on port 28910. This server is responisible for sending server lists to the online server browser in the BF2 multiplayer menu
상속: BF2Statistics.Gamespy.Net.GamespyTcpSocket
        public MasterServer(ref int Port, LogWriter DebugLog) : base(27900, MaxConnections)
        {
            // Debugging
            this.DebugLog = DebugLog;
            DebugLog.Write("Bound to UDP port: " + Port);

            // === Start Server List Retrieve Tcp Socket
            Port = 28910;
            DebugLog.Write("Starting Server List Retrieve Socket");
            MasterTcpServer = new ServerListRetrieveSocket();
            DebugLog.Write("Bound to TCP port: " + Port);

            // Start accepting
            base.StartAcceptAsync();

            // Setup timer. Remove servers who havent ping'd since ServerTTL
            PollTimer          = new Timer(5000);
            PollTimer.Elapsed += (s, e) => CheckServers();
            PollTimer.Start();
        }
예제 #2
0
        public MasterServer(ref int Port, LogWriter DebugLog)
            : base(27900, MaxConnections)
        {
            // Debugging
            this.DebugLog = DebugLog;
            DebugLog.Write("Bound to UDP port: " + Port);

            // === Start Server List Retrieve Tcp Socket
            Port = 28910;
            DebugLog.Write("Starting Server List Retrieve Socket");
            MasterTcpServer = new ServerListRetrieveSocket();
            DebugLog.Write("Bound to TCP port: " + Port);

            // Start accepting
            base.StartAcceptAsync();

            // Setup timer. Remove servers who havent ping'd since ServerTTL
            PollTimer = new Timer(5000);
            PollTimer.Elapsed += (s, e) => CheckServers();
            PollTimer.Start();
        }