Beispiel #1
0
        private static void BuildServer(IPEndPoint gdServer, ServerList list, ESteam2ServerType type)
        {
            try
            {
                GeneralDSClient gdsClient = new GeneralDSClient();
                gdsClient.Connect(gdServer);

                IPEndPoint[] servers = gdsClient.GetServerList(type);
                list.AddRange(servers);

                gdsClient.Disconnect();
            }
            catch (Exception)
            {
                Console.WriteLine("Warning: Unable to connect to GDS {0} to get list of {1} servers.", gdServer, type);
            }
        }
Beispiel #2
0
        public static void BuildAuthServers(string username)
        {
            foreach (IPEndPoint gdServer in GeneralDSClient.GDServers)
            {
                try
                {
                    GeneralDSClient gdsClient = new GeneralDSClient();
                    gdsClient.Connect(gdServer);

                    IPEndPoint[] servers = gdsClient.GetAuthServerList(username);
                    AuthServers.AddRange(servers);

                    gdsClient.Disconnect();
                }
                catch
                {
                    Console.WriteLine("Warning: Unable to connect to GDS {0} to get list of auth servers.", gdServer);
                }
            }
        }