peerDisconnectedCallback

GameSpy SDK

peerDisconnectedCallback

Called when a local player has been disconnected from the chat server for any reason.

typedef void (*peerDisconnectedCallback)(
PEER peer,
const gsi_char * reason,
void * param );
RoutineRequired HeaderDistribution
peerDisconnectedCallback<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object
reason
[in] The string containing the reason for disconnection
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerDisconnectedCallback is called when the connection to the server gets disconnected, either from a call to peerDisconnect(), a lost connection, or getting killed by the server. To connect again, just use peerConnect(). After reconnecting, any rooms the user was in will need to be rejoined.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerDisconnectedCallbackpeerDisconnectedCallbackApeerDisconnectedCallbackW

peerDisconnectedCallbackW and peerDisconnectedCallbackA are UNICODE and ANSI mapped versions of peerDisconnectedCallback. The arguments of peerDisconnectedCallbackA are ANSI strings; those of peerDisconnectedCallbackW are wide-character strings.

Section Reference: Gamespy Peer SDK