| Methods |
public
|
__construct(null|string $address = null, null|int $queryport = null)
Constructor. Initializes the Satisfactory query instance.
Constructor. Initializes the Satisfactory query instance.
Parameters
| $address |
The server address to query
|
| $queryport |
The query port for the Satisfactory server (default 15777)
|
Overrides
|
#
|
public
|
query_server(bool $getPlayers = true, bool $getRules = true): bool
Queries the Satisfactory server and populates server information. Sends a query request and processes the response to extract server details,
player information, and game settings.
Queries the Satisfactory server and populates server information. Sends a query request and processes the response to extract server details,
player information, and game settings.
Parameters
| $getPlayers |
Whether to retrieve player information
|
| $getRules |
Whether to retrieve server rules/settings
|
Returns
True on successful query, false on failure
Overrides
|
#
|
public
|
query(ServerAddress $addr): ServerInfo
query method. Performs a query on the specified Satisfactory server address. Updates internal state with server information and returns a ServerInfo object
containing the query results.
query method. Performs a query on the specified Satisfactory server address. Updates internal state with server information and returns a ServerInfo object
containing the query results.
Parameters
| $addr |
The server address and port to query
|
Returns
Server information including status, players, and settings
Implements
|
#
|
public
|
getProtocolName(): string
Returns the protocol name for Satisfactory.
Returns the protocol name for Satisfactory.
Returns
The protocol identifier 'Satisfactory'
Implements
|
#
|
public
|
getVersion(ServerInfo $info): string
Extracts the Satisfactory server version from server information.
Extracts the Satisfactory server version from server information.
Parameters
| $info |
The server information object
|
Returns
The server version string, or 'unknown' if not available
Implements
|
#
|
protected
|
parseResponse(string $data): bool
Parses the raw response data from the Satisfactory server. Extracts server information, player data, and settings from the binary response.
Parses the raw response data from the Satisfactory server. Extracts server information, player data, and settings from the binary response.
Parameters
| $data |
The raw binary data received from the server
|
Returns
True if parsing was successful, false otherwise
|
#
|