This is a functional implementation of Valve's Source A2S_info query protocol in Visual Basic .NET.
This snippet shows how to successfully query a Source-based game server and receive useful data like hostname, number of players, current map, number of bots, max players allowed on the server and other aditional data.
This code is implemented in my Counter-Strike 2 game server admin tool: https://github.com/fpaezf/CS2-RCON-Tool-V2
Documentation:
- https://developer.valvesoftware.com/wiki/Server_queries
- https://stackoverflow.com/questions/77703539/parsing-data-from-byte-array
- https://github.com/armageddonapps/QueryMaster
- https://www.unknowncheats.me/forum/181080-post1.html
- https://www.codeproject.com/Articles/37417/Multi-Threaded-Game-Server-Browser
- https://www.codeproject.com/Articles/8834/A-gameserver-Query-Library