peerEnumPlayers

GameSpy SDK

peerEnumPlayers

Enumerates through the players in a room.

void peerEnumPlayers(
PEER peer,
RoomType roomType,
peerEnumPlayersCallback callback,
void * param );
RoutineRequired HeaderDistribution
peerEnumPlayers<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object.
roomType
[in] Can be either TitleRoom, GroupRoom or StagingRoom.
callback
[in] Callback function to be called when the operation completes.
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerEnumPlayers function may be used to iterate through the list of players in the specified room type.  The callback will be called for each player in the room, and then once again when done with "index" set to -1 and "nick" set to NULL. The enumeration is done using a local list of players, and the callbacks will be called from within the function call. This only works if there is a title set, and the user is in the room.

Section Reference: Gamespy Peer SDK