Ive found something very strange.
Based on this information:
http://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol
But when I do this:
I get as result this:
And as the information said, 69 87 should be 27015 (which is the default port for steam servers).
Am I using the wrong function for a Unsigned short or is an other problem?
Fixed, I used IPAddress.HostToNetworkOrder()
Based on this information:
Code:
Reply Format
The reply always starts with FF FF FF FF 66 0A.
The format is then a series of these server address blocks:
Type Data
Byte First octet of IP address
Byte Second octet of IP address
Byte Third octect of IP address
Byte Fourth octet of IP address
[b]Unsigned Short Port number - usually 27015 (69 87) - this is network ordered, which is unlike every other Steam protocol.[/b]
Some of the servers may be unreachable, so query each server directly to find out. Note also that this list is not exhaustive, so if youre looking for a particular type of server make sure that you specify a filter with the query, rather than filtering client side.
http://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol
But when I do this:
C#:
System.Windows.Forms.MessageBox.Show(BitConverter.ToUInt16(new byte[] { 0x69, 0x87 }, 0).ToString());
I get as result this:
34665
And as the information said, 69 87 should be 27015 (which is the default port for steam servers).
Am I using the wrong function for a Unsigned short or is an other problem?
Fixed, I used IPAddress.HostToNetworkOrder()
Last edited by a moderator: