peerPingPlayer

GameSpy SDK

peerPingPlayer

Send a ping request to a remote player.

PEERBool peerPingPlayer(
PEER peer,
const gsi_char * nick );
RoutineRequired HeaderDistribution
peerPingPlayer<peer.h>SDKZIP

Return Value

Returns PEERTrue if a ping attempt is made, PEERFalse otherwise.

Parameters

peer
[in] Initialized peer object.
nick
[in] Nickname of the remote player to ping.

Remarks

The peerPingPlayer function sends a UDP ping to the specified player.  Peer already automatically pings all players that are in ping rooms (which are set in peerSetTitle). This function does a one-time ping of a remote player in a non-ping room. However pings must be enabled in at least one room for this to work, otherwise Peer will not open the UDP ping socket. Also, peerAlwaysGetPlayerInfo() must be enabled so that Peer has IPs for players that are only in non-ping rooms.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerPingPlayerpeerPingPlayerApeerPingPlayerW

peerPingPlayerW and peerPingPlayerA are UNICODE and ANSI mapped versions of peerPingPlayer. The arguments of peerPingPlayerA are ANSI strings; those of peerPingPlayerW are wide-character strings.

Section Reference: Gamespy Peer SDK