peerQRCountCallback

GameSpy SDK

peerQRCountCallback

Callback when reporting a game, this callback is used to get a count of the number of players or teams.

typedef int (*peerQRCountCallback)(
PEER peer,
qr2_key_type type,
void * param );
RoutineRequired HeaderDistribution
peerQRCountCallback<peer.h>SDKZIP

Return Value

Parameters

peer
[in] Initialized peer object
type
[in] A type of Qr2 keys. Can be either key_server, key_player, key_team.
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerQRCountCallback function is called while hosting a game to get the number of players or teams. 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 number of players, and this callback will not be called for a player count. Otherwise the application must report the number of players in this callback, and it must always report the number of teams (or 0 if not using teams).

Section Reference: Gamespy Peer SDK