peerSetGlobalWatchKeys

GameSpy SDK

peerSetGlobalWatchKeys

Set the global watch keys for the specified room type.

void peerSetGlobalWatchKeys(
PEER peer,
RoomType roomType,
int num,
const gsi_char ** keys,
PEERBool addKeys );
RoutineRequired HeaderDistribution
peerSetGlobalWatchKeys<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object.
roomType
[in] Can be either TitleRoom, GroupRoom or StagingRoom.
num
[in] Number of keys in the array.
keys
[in] Array of keys to watch for.
addKeys
[in] When set to PEERTrue this keys will be added to the existing watch key list.

Remarks

The peerSetGlobalWatchKeys sets the global watch keys for a room type. If addKeys is set to PEERTrue, the keys will be added to the current global watch keys for this room. If addKeys is PEERFalse, these will replace any existing global watch keys for this room. When entering a room of the given type, peer will get and cache these keys for all players in the room. To check the value of a key at any time, use peerGetGlobalWatchKey(). This will fail if no title is set and if peer is not connected.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerSetGlobalWatchKeyspeerSetGlobalWatchKeysApeerSetGlobalWatchKeysW

peerSetGlobalWatchKeysW and peerSetGlobalWatchKeysA are UNICODE and ANSI mapped versions of peerSetGlobalWatchKeys. The arguments of peerSetGlobalWatchKeysA are ANSI strings; those of peerSetGlobalWatchKeysW are wide-character strings.

Section Reference: Gamespy Peer SDK