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 next message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
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
Re: Some simple C# code for retrieving servers and server info from the GameSpy master list [message #492147 is a reply to message #492143] Wed, 12 April 2017 21:17 Go to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma: 1
General (3 Stars)
Thumbs Up

http://s18.postimage.org/jc6qbn4k9/bricks3.png
Previous Topic: Fixed water shader for C&C_Beach
Next Topic: MapFix Plugin
Goto Forum:
  


Current Time: Sun Oct 13 15:38:29 MST 2024

Total time taken to generate the page: 0.00571 seconds