OpenGSQ Test Documentation

website·Indexed 30 days ago

https://dotnet.opengsq.com/

Technical test execution results and method documentation for OpenGSQ, covering various game server protocols including Minecraft, FiveM, Source Rcon, GameSpy, Unreal2, WON, and TeamSpeak3. Includes test data for methods such as GetStatusTest, GetPlayersTest, and AuthenticateTest.

Tokens
28.5K
Snippets
207
Records
260
Agent score
50%

What's inside OpenGSQ

  1. Introduction to OpenGSQ .NET Library

    OpenGSQ is an open-source game server query library designed to help developers and administrators query game servers efficiently. The .NET implementation allows applications written in C# to perform these queries through a convenient API.
  2. Overview of OpenGSQ.Responses.Source namespace

    The OpenGSQ.Responses.Source namespace provides the data structures and enumerations used to handle responses from Source engine servers. It includes classes for server information, player data, and various enumerations to describe server state, environment, and security settings.
  3. Introduction to OpenGSQ .NET Library

    OpenGSQ is an open-source game server query library designed to help developers and administrators query game servers efficiently. The .NET library specifically enables applications written in C# to perform server queries through a convenient API.
  4. GameSpy3 Class Overview

    The GameSpy3 class (located in OpenGSQ.Protocols within OpenGSQ.dll) implements the GameSpy Query Protocol version 3. It inherits from ProtocolBase and is the base class for GameSpy4. It provides properties like FullName to identify the protocol and a protected field ChallengeRequired to determine if the challenge method should be used.
  5. PalWorld Game Server Information Schema

    The PalWorld game server response provides detailed metadata about the server's state, configuration, and attributes. Key data points include player capacity (maxPublicPlayers), server status (started), and a set of specific attributes such as the server version (VERSION_s), region (REGION_s), server address (ADDRESS_s), and the current map (MAPNAME_s).
    {
      "deployment": "0a18471f93d448e2a1f60e47e03d3413",
      "id": "73dccdf58bae4bbd8ca8ab6516e9c0b5",
      "bucket": "Pal_1",
      "settings": {
        "maxPublicPlayers": 32,
        "allowInvites": false,
        "shouldAdvertise": true,
        "allowReadById": true,
        "allowJoinViaPresence": true,
        "allowJoinInProgress": true,
        "allowConferenceRoom": false,
        "checkSanctions": false,
        "allowMigration": false,
        "rejoinAfterKick": "",
        "platforms": null
      },
      "totalPlayers": 0,
      "openPublicPlayers": 32,
      "publicPlayers": [],
      "started": true,
      "lastUpdated": null,
      "attributes": {
        "OWNINGUSERNAME_s": "DedicatedServer - euid65532",
        "GAMESERVER_PORT_l": 30111,
        "DAYS_l": 254,
        "NUMPRIVATECONNECTIONS_l": 0,
        "TYPE_s": "Official",
        "CREATE_TIME_l": 1707082563,
        "SERVERTIME_l": 39,
        "DEDICATEDONLY_b": true,
        "ISPASSWORD_b": false,
        "VERSION_s": "v0.1.4.0",
        "NAMESPACE_s": "production",
        "BANTICHEATPROTECTED_b": false,
        "BUSESSTATS_b": false,
        "WORLDGUID_s": "0F4EAE5CD6D14FBA86E3C95DAF86E61B",
        "REGION_s": "NA",
        "NAME_s": "Official NA Server 0111",
        "ADDRESS_s": "35.226.201.18",
        "PRESENCESEARCH_b": true,
        "NUMPUBLICCONNECTIONS_l": 32,
        "DESCRIPTION_s": "All guild items, buildings and Pals will be REMOVED if no guild members have logged in to the server in the last 168 hours.",
        "BUILDUNIQUEID_l": 0,
        "BISDEDICATED_b": true,
        "PLAYERS_l": 11,
        "MAPNAME_s": "MainWorld5"
      },
      "owner": "Client_xyza78918C8ZyYGcxMcpvTQjPFdjtykx",
      "ownerPlatformId": null
    }
  6. Retrieve Battlefield game server information

    Use the GetInfo() method to asynchronously retrieve general information about the Battlefield game server. This method throws a TimeoutException if the operation exceeds the configured timeout.
    public Task<Info> GetInfo()
  7. KillingFloor class overview

    The KillingFloor class (Namespace: OpenGSQ.Protocols, Assembly: OpenGSQ.dll) implements the Killing Floor protocol. It inherits from Unreal2 and ProtocolBase, providing access to server details and standard protocol properties like Host, Port, and Timeout.
  8. Retrieve server status using GameSpy3

    The GetStatus() method asynchronously retrieves server information, including details about the server (Info), current players, and teams. It returns a Task<Status> object.

    Possible exceptions include:

    • InvalidPacketException: Thrown if the packet header is incorrect.
    • TimeoutException: Thrown if the operation exceeds the configured timeout.
    public Task<Status> GetStatus()
  9. Implement a custom protocol using ProtocolBase

    The ProtocolBase class is an abstract base class in the OpenGSQ namespace (Assembly: OpenGSQ.dll) used to implement game server query protocols. It provides core properties for connection management and a protected method for IP resolution. Derived classes include implementations for Minecraft, Source, Battlefield, and others.
    public abstract class ProtocolBase
  10. Retrieve player and team lists using GameSpy1

    Use these methods to get lists of participants and teams on the server. Both return a list of dictionaries containing the respective entity's attributes.

    • GetPlayers(bool XServerQuery): Returns information about each player on the server.
    • GetTeams(): Returns information about each team on the server.

    These methods may throw a TimeoutException.

    // Get list of players
    var players = await gameSpy.GetPlayers(true);
    
    // Get list of teams
    var teams = await gameSpy.GetTeams();
  11. Use the Info class to represent Battlefield game server data

    The Info class (located in the OpenGSQ.Responses.Battlefield namespace within OpenGSQ.dll) is used to store and retrieve metadata about a specific game server. It contains properties ranging from basic connectivity (Hostname, IpPort) to game-specific state (Map, GameType, RoundTime).
    public class Info