chore: Add address field in README (#481)

* chore: add address field in README

* fix table spacing

* updates CHANGELOG

* Update CHANGELOG.md
This commit is contained in:
Pedro Ivo Hudson 2024-01-17 08:11:31 -03:00 committed by GitHub
parent 06df9604d6
commit fca459b336
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 13 deletions

View file

@ -34,6 +34,7 @@
* New option: `stripColors` (defaults to `true`) for protocols that strips colors: unreal2, savage2, quake3, nadeo, gamespy2, doom3, armagetron.
* New option: `requestRulesRequired` (defaults to `false`) Valve games only. `requestRules` is always required to have a response or the query will timeout.
* New option: `requestPlayersRequired` (defaults to `false`) Valve games only. Querying players is always required to have a response or the query will timeout. Some [games](GAMES_LIST.md) may not provide a players response.
* New option: `address` (defaults to `undefined`) Override the IP address of the server skipping DNS resolution. When set, host will not be resolved, instead address will be connected to. However, some protocols still use host for other reasons e.g. as part of the query.
#### Games
* Removed the players::setNum method, the library will no longer add empty players as

View file

@ -38,7 +38,8 @@ Confused on how this works, or you want to see more? Checkout the [examples](/ex
## Optional Fields
| Field | Type | Default | Description |
|:---------------------------|:--------|:----------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|:---------------------------|:--------|:----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **address** | string | undefined | Override the IP address of the server skipping DNS resolution. When set, host will not be resolved, instead address will be connected to. However, some protocols still use host for other reasons e.g. as part of the query. |
| **port** | number | Game port | Connection port or query port for the game server. Some games utilize a separate "query" port. If specifying the game port does not seem to work as expected, passing in this query port may work instead. |
| **maxAttempts** | number | 1 | Number of attempts to query server in case of failure. |
| **socketTimeout** | number | 2000 | Milliseconds to wait for a single packet. Beware that increasing this will cause many queries to take longer even if the server is online. |