PDA

View Full Version : Server Query Documentation?



_watcher
Jul 5 2009, 14:58
I was wanting to code my own server query program but have found no documentation on this. Is any publicly available?

Thanks in advance,

_watcher

MessiahUA
Jan 27 2011, 12:22
Is there any information about this?

I'm using this query "0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF" to get info about server, but since some patch (don't remember exactly which one), this query doesn't provide players info.

Anyone know how to query server for player list?

Sickboy
Jan 27 2011, 12:35
Is there any information about this?

I'm using this query "0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF" to get info about server, but since some patch (don't remember exactly which one), this query doesn't provide players info.

Anyone know how to query server for player list?
I use the same but players info is included for me.

First I remove \x00\x04\x05\x06\a, then I split at \x00\x00\x00 into array.
At index 0 is all the normal data, and at index 1 is the players data.

Plz excuse the mess; http://dev-heaven.net/projects/six-updater-gui/repository/revisions/develop/entry/SixUpdaterGui/app/six/query/gamespy.rb

MessiahUA
Jan 28 2011, 08:56
I've made some debug and found out, that the problem is in too long mod string (mod hashes), for some reason I get only 1400 bytes and nothing more. If I turn off all mods on server - everything is fine until it fits in 1400 bytes.

Sickboy
Jan 28 2011, 09:36
I've made some debug and found out, that the problem is in too long mod string (mod hashes), for some reason I get only 1400 bytes and nothing more. If I turn off all mods on server - everything is fine until it fits in 1400 bytes.Perhaps you limit the amount of data you read from the socket somewhere.

MessiahUA
Jan 28 2011, 10:21
I've checked everything. Here is simplified php code:


$sock = @<hidden>("udp://".$data["arma_server"], $data["arma_port"], $error_no, $error_str);
$queryString = pack("c*",0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF);
fwrite($sock, $queryString);
$reply = fread($sock, 8000);
fclose($sock);

also i tried "while ($line = fgets($sock)) $reply .= $line;", but it hangs if I don't set socket timeout, because for some reason it can't detect eof.

I also checked tcpdump and all i get is one udp packet 1400 length...

:(

nuxil
Jan 28 2011, 10:51
Check this out

http://gameq.sourceforge.net/

Sickboy
Jan 28 2011, 11:00
According to http://www.codeproject.com/KB/game/gameserverinfo.aspx
Most servers only send max 1400-1500 bytes in a single packet. If the info is bigger it is split into multiple packets.
It seems the Ruby and .NET UDPClient handle this automatically for me ;)

MessiahUA
Jan 28 2011, 11:03
Thanks a lot nuxil, will check it!

Thanks for you answers Sickboy!

br@cob
Jul 31 2011, 22:42
I ran into this when I started running an ArmA II OA CO server. I think with the 1.59 patch the game query stopped working until I switched to using Gamespy3 protocol.

sirfstar
Sep 2 2011, 10:32
up.
0xFE,0xFD,0x00,0x04,0x05,0x06,0x07,0xFF,0xFF,0xFF packet sending to server:gameport gives no any response. Whats actual packet for 1.59 and how can i get valid query port?

devilop
Sep 24 2011, 15:46
im interested too

sirfstar
Dec 26 2011, 22:14
up
Server responds on "FE FD 09" plus any 4 bytes, what for are these bytes?
upd:
solved, - http://forums.bistudio.com/showpost.php?p=2047090&postcount=8

mobeus
Jan 11 2012, 09:33
any programmer info - ie non php related

c possibly?
or basic ?

i was going to make a friend finder but it seems difficult finding info how the queries/replys are handled.
i know the information is around but i dont want to re-invent the wheel when people allready have the info.

mobeus
Jan 11 2012, 19:51
bump bump bump

[ASO] Daddybear
Jan 20 2012, 13:52
Hopefully somebody can help me with this.

For the query of my dedicated servers I've tried

http://www.armaholic.com/page.php?id=243
http://gameq.sourceforge.net/
http://www.greycube.com/site/download.php?view.56

nothing of these works.

Of course the server is online an reachable.
Ports are open too.
Gametracker does tracker the servers but I don't understand why I can't do this?

Could some one tell me what I've to do?

Thanks.

nomad_man
Jan 23 2012, 06:51
gameq2 works you just need to updated it to latest gamespy protocol

GameQ/gameq/protocols/armedassault2oa.php



class GameQ_Protocols_Armedassault2oa extends GameQ_Protocols_Gamespy3
{
protected $name = "armedassault2oa";
protected $name_long = "Armed Assault 2: Operation Arrowhead";

protected $port = 2302;
}