peerQRKeyListCallback
Called when reporting a game, this callback is used to get a list of keys the application will report.
- typedef void (*peerQRKeyListCallback)(
- PEER peer,
- qr2_key_type type,
- qr2_keybuffer_t keyBuffer,
- void * param );
Routine | Required Header | Distribution |
---|---|---|
peerQRKeyListCallback | <peer.h> | SDKZIP |
Parameters
- peer
- [in] Initialized peer object
- type
- [in] A type of Qr2 keys. Can be either key_server, key_player, key_team.
- keyBuffer
- [in] The buffer to append the key to
- param
- [in] Pointer to user data. This is optional and will be passed unmodified to the callback function.
Remarks
The peerQRKeyListCallback function is called while hosting a game to list keys the application will report. For example usage see the PeerTest sample. For a detailed explanation of how server reporting works, see the Query & Reporting 2 SDK documentation.
Peer already registers certain keys, and these do not need to be registered by the application. Peer registers the following server keys: HOSTNAME_KEY, NUMPLAYERS_KEY, MAXPLAYERS_KEY, GAMEMODE_KEY, PASSWORD_KEY (if a password is set), and GROUPID_KEY (if in a group room). Peer also registers the player keys PLAYER__KEY and PING__KEY. Any other keys used by the application must be registered in this callback.
Section Reference: Gamespy Peer SDK