peerConnectCallback

GameSpy SDK

peerConnectCallback

Callback for peerConnect.

typedef void (*peerConnectCallback)(
PEER peer,
PEERBool success,
int failureReason,
void * param );
RoutineRequired HeaderDistribution
peerConnectCallback<peer.h>SDKZIP

Parameters

peer
[in] Initialized peer object.
success
[in] PEERTrue if connection was successful, PEERFalse if connection failed
failureReason
[in] int value giving reason for failure
param
[in] Pointer to user data. This is optional and will be passed unmodified to the callback function.

Remarks

The peerConnectCallback funtion will notify the application of a successful connection or a failure. Based the "success" parameter the "failureReason" will tell the application why a connection failed. The values for the "failureReason" are:
PEER_DISCONNECTED
Unable to connect to the server, or disconnected during the attempt.
PEER_NICK_ERROR
There was a nick error that was not handled.
PEER_LOGIN_FAILED
The login info passed to peerConnectLogin was invalid.

Section Reference: Gamespy Peer SDK