mindstorm 8 Posted December 1, 2014 Hey guys, I've been trying to find out how to query an arma3 server (in this case from C#). No luck so far however. From my understanding since gamespy stopped arma switched over to steamquery? So far I've tried this libarary (C#): https://github.com/firefly2442/phparma2serverstatus This didn't work however. Than I read something about gamespy stopping so I looked into steam condenser, and found a library. https://github.com/txdv/steam-condenser-csharp This however also doesn't work. Is there anywhere I can find some sort of clarification on what protocol arma uses a.t.m. and how to implement it? Share this post Link to post Share on other sites
ZertyKchan 14 Posted December 1, 2014 You should use the querry on the query port that is hardcoded to gameport+1 (If I remember correctly). The full description of the protocol used for steam querry can be found here. There is additionnal information on the Wiki . There migth be some implemented API libraries around. Share this post Link to post Share on other sites
mindstorm 8 Posted December 1, 2014 (edited) Thanks for the reply. I found this class: https://github.com/Noahii/ArmAQuery/blob/master/ArmA3.cs It's depricated (as in not working). But with the steam server queries page I've been able to fix it. edit: I've been able to get the server information working but not the ping. This is my code for server information: byte[] request, response; IPEndPoint remoteIpEndpoint = new IPEndPoint(IPAddress.Parse(host), port); client.Client.ReceiveTimeout = 100; client.Connect(remoteIpEndpoint); //Server Info request = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0x54, 0x53, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x20, 0x45, 0x6E, 0x67, 0x69, 0x6E, 0x65, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x00 }; client.Send(request, request.Length); response = client.Receive(ref remoteIpEndpoint); //string dataServer = Encoding.ASCII.GetString(response).Remove(0, 5); this.ServerInfo = ServerInfo.Parse(response); This works. However the ping part doesn't work: request = new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0x69 }; client.Send(request, request.Length); response = client.Receive(ref remoteIpEndpoint); I get a socketexeption. The request header is however excactly as stated on the steam server queries page. Anny suggestions on how to get the ping time? Edit2 Feeling so stupid right now. Just implemented it myselve: Stopwatch.Start(); response = client.Receive(ref remoteIpEndpoint); Stopwatch.Stop(); this.ping = Stopwatch.ElapsedMilliseconds; Edited December 2, 2014 by mindstorm Share this post Link to post Share on other sites
Silentsean14 10 Posted December 20, 2014 Would you be willing to share the fixed class? :) Share this post Link to post Share on other sites
terox 316 Posted December 20, 2014 -would be very nice if you publicise a working query that we can plug into our sites Share this post Link to post Share on other sites
mindstorm 8 Posted January 16, 2015 Hey guys, sorry for the delay. Here's the class I used at the time. It works partly (server info/players). It's a big mess so you might wanna do some refactoring =). http://pastebin.com/L6sDFXLQ Share this post Link to post Share on other sites