QueryHost
Esc

Documentation menu

API reference · interfaces

Interface: GameDefinition<G>

Generated from the QueryHost package public TypeScript contract.

Static metadata for one supported game profile.

Type Parameters

G

G extends GameId = GameId

Properties

capabilities

readonly capabilities: Readonly<Record<GameCapability, SupportLevel>>


defaultPort?

readonly optional defaultPort?: number

Default game or service port; omitted when the profile cannot infer one.


defaultQueryPort?

readonly optional defaultQueryPort?: number

Conventional query port corresponding to defaultPort when the protocol uses a separate destination. Custom game ports preserve the offset unless queryPortStrategy is fixed.


id

readonly id: G


name

readonly name: string


protocol

readonly protocol: GameProtocolMap[G]

Protocol the profile queries. A game with no game-specific interpretation is queried through its protocol's shared profile, so an A2S game can be added with only its definition.


queryPortStrategy?

readonly optional queryPortStrategy?: "offset" | "fixed"

Whether a custom game port shifts the conventional query port or leaves it fixed.


steamAppId?

readonly optional steamAppId?: number

Steam App ID a server of this game advertises in A2S Info, which lets detect() tell games apart that share a protocol and port. Omitted for games that are not identified on Steam.