peerPlayerMessageCallback

GameSpy SDK

peerPlayerMessageCallback

Callback called when a private message is received from another player.

typedef void (*peerPlayerMessageCallback)(
PEER peer,
const gsi_char * nick,
const gsi_char * message,
MessageType messageType,
void * param );
RoutineRequired HeaderDistribution
peerPlayerMessageCallback<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object.
nick
[in] The player's chat nickname
message
[in] The message sent by the player.
messageType
[in] The type of message sent. Most commonly NormalMessage or ActionMessage.
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerPlayerMessageCallback function is called when a remote player sends the local player a message. The message can be of two types, namely NormalMessage or ActionMessage.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerPlayerMessageCallbackpeerPlayerMessageCallbackApeerPlayerMessageCallbackW

peerPlayerMessageCallbackW and peerPlayerMessageCallbackA are UNICODE and ANSI mapped versions of peerPlayerMessageCallback. The arguments of peerPlayerMessageCallbackA are ANSI strings; those of peerPlayerMessageCallbackW are wide-character strings.

Section Reference: Gamespy Peer SDK