Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » Some simple C# code for retrieving servers and server info from the GameSpy master list
Some simple C# code for retrieving servers and server info from the GameSpy master list [message #492143] Wed, 12 April 2017 11:12 Go to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
see

https://github.com/Iran/RenegadeGSAClientLib/blob/master/GameSpy.cs

GameSpy.GetRenegadeGSAMasterServerList() returns an array of IPEndPoints.
GameSpy.Get_Game_Server_Data(IPEndPoint server) will give you a Dictionary<string, string> which is a key value mapping of server info + player info.

Example usage:

Quote:

var Servers = GameSpy.GetRenegadeGSAMasterServerList();


foreach (var server in Servers)
{
// Console.WriteLine(server.Address.ToString());


GameSpy.Get_Game_Server_Data(server);
}

Console.Read();


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
 
Read Message
Read Message
Previous Topic: Fixed water shader for C&C_Beach
Next Topic: MapFix Plugin
Goto Forum:
  


Current Time: Sat Dec 21 09:13:00 MST 2024

Total time taken to generate the page: 0.00753 seconds