peerQRPlayerKeyCallback

GameSpy SDK

peerQRPlayerKeyCallback

Called when getting values for any player keys the game is reporting.

typedef void (*peerQRPlayerKeyCallback)(
PEER peer,
int key,
int index,
qr2_buffer_t buffer,
void * param );
RoutineRequired HeaderDistribution
peerQRPlayerKeyCallback<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object
key
[in] The key for reporting information
index
[in] The array index of the player to report
buffer
[in] The buffer for data
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerQRPlayerKeyCallback function is called while hosting a game to report values for player keys. For example usage see the PeerTest sample. For a detailed explanation of how server reporting works, see the Query & Reporting 2 SDK documentation.
If in staging, and either not playing or peerStartGame was called with PEER_REPORT_PLAYERS set in the reporting options, then Peer will report the PLAYER__KEY and PING__KEY keys, and the callback will not be called for these key. The application is responsible for reporting any other player keys and is also responsible for these keys when Peer does not report them. Any other keys the application reports must be registered with the peerQRKeyListCallback() (see below). The number of players is set with the peerQRCountCallback() see below).

Section Reference: Gamespy Peer SDK