I'm not sure if you support the c# version of the GSList, but I tried contacting the creator (fordgt90concept) to no avail
It's a fairly simple implementation:
Code:
/// Adapted from code by Luigi Auriemma: http://aluigi.altervista.org/
/// Validation code converted from C to PHP by Lithium.
/// EncType2_Decoder converted from C to VB by Tres: http://www.nfbsp.com/
/// Both of the above converted from PHP and VB to C# by FordGT90Concept.
/// EncType1 not supported.
Code:
public static IPEndPoint[] GetMasterServerList(string gamename, string handoff, EncType type, string filter)
Code:
/// Converted from Tres's VB code with new FordGT90Concept optimizations...
/// GetMasterServerList method -Takes the gamename, handoff, enctype, and handoff and returns a list of endpoints.
/// gamename - The name of the game. A relatively complete list of these can be found in C:\Program Files\GameSpy Arcade\Services\detection.cfg
/// handoff - The game's handoff. This can be found via http://motd.gamespy.com/software/services/index.aspx?mode=full&services=GAMENAME
/// type - Recommended to use EncType.Advanced2--EncType.Basic is obsolete.
/// filter - A filter to apply. It is the same as what you would enter into GameSpy Arcade filters.
/// <returns>An array of IPEndPoints. Each IPEndPoint represents a hosting server.</returns>
I try to do:
Code:
private System.Net.IPEndPoint[] masterlist = GameSpy.GetMasterServerList("halom", "e4Rd9J", GameSpy.EncType.Advanced2, "");
However, every time I run the code the length of the array is always zero - the TCP response is 8 - 10 bytes and is not decoded. I tried multiple handoff codes: "Gmed4URudD9bJQ", "e4Rd9J", and "Xn221z" - none of them seem to change the result.
Am I doing something wrong? Is the c# port for gslist broken?