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 );
Routine | Required Header | Distribution |
---|---|---|
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
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
peerDisconnectedCallback | peerDisconnectedCallbackA | peerDisconnectedCallbackW |
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