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
Inheritance: BF2Statistics.Gamespy.Net.GamespyTcpSocket
Ejemplo n.º 1
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();
        }
Ejemplo n.º 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();
        }