peerGetPlayersCrossPing

GameSpy SDK

peerGetPlayersCrossPing

Calculates the cross-ping between 2 players.

PEERBool peerGetPlayersCrossPing(
PEER peer,
const gsi_char * nick1,
const gsi_char * nick2,
int * crossPing );
RoutineRequired HeaderDistribution
peerGetPlayersCrossPing<peer.h>SDKZIP

Return Value

This function returns PEERTrue if a cached cross ping is available.  PEERFalse otherwise.

Parameters

peer
[in] Initialized peer object.
nick1
[in] Chat nickname of player 1.
nick2
[in] Chat nickname of player 2.
crossPing
[out] This is set to the cross-ping, if available.

Remarks

The peerGetPlayersCrossPing function is used to calculate the cross ping between two players. Returns PEERFalse if we don't have or can't get the player's cross-ping. The ordering of the nicks does not matter (i.e., peer stores the pings between sets of players, not each player’s ping to each other player). This function only works if a title is set, and the peer object is connected to the chat server.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerGetPlayersCrossPingpeerGetPlayersCrossPingApeerGetPlayersCrossPingW

peerGetPlayersCrossPingW and peerGetPlayersCrossPingA are UNICODE and ANSI mapped versions of peerGetPlayersCrossPing. The arguments of peerGetPlayersCrossPingA are ANSI strings; those of peerGetPlayersCrossPingW are wide-character strings.

Section Reference: Gamespy Peer SDK