Doc: Acknowledge integer type mismatch in certain admin packets using AdminUpdateType (#8238)

This commit is contained in:
duck
2020-06-27 16:21:17 +00:00
committed by GitHub
parent 75a2ae2f48
commit 1bc7047af7
2 changed files with 16 additions and 2 deletions

View File

@@ -86,6 +86,9 @@ Last updated: 2011-01-20
Note: not every update type supports every frequency. If in doubt, you can
verify against the data received in `ADMIN_PACKET_SERVER_PROTOCOL`.
Please note the potential gotcha in the "Certain packet information" section below
when using the `ADMIN_UPDATE_FREQUENCY` packet.
The server will not confirm your registered update. However, asking for an
invalid `AdminUpdateType` or a not supported `AdminUpdateFrequency` you will be
disconnected from the server with `NETWORK_ERROR_ILLEGAL_PACKET`.
@@ -143,6 +146,9 @@ Last updated: 2011-01-20
- ADMIN_UPDATE_COMPANY_STATS
- ADMIN_UPDATE_CMD_NAMES
Please note the potential gotcha in the "Certain packet information" section below
when using the `ADMIN_POLL` packet.
`ADMIN_UPDATE_CLIENT_INFO` and `ADMIN_UPDATE_COMPANY_INFO` accept an additional
parameter. This parameter is used to specify a certain client or company.
Setting this parameter to `UINT32_MAX (0xFFFFFFFF)` will tell the server you
@@ -213,6 +219,14 @@ Last updated: 2011-01-20
## 7.0) Certain packet information
`ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY` and `ADMIN_PACKET_ADMIN_POLL`
Potential gotcha: the AdminUpdateType integer type used is a
uint16 for `UPDATE_FREQUENCY`, and a uint8 for `POLL`.
This is due to boring legacy reasons.
It is safe to cast between the two when sending
(i.e cast from a uint8 to a uint16).
All `ADMIN_PACKET_SERVER_*` packets have an enum value greater 100.
`ADMIN_PACKET_SERVER_WELCOME`