NNBeginNegotiation

GameSpy SDK

NNBeginNegotiation

Starts the negotiation process.

NegotiateErrorĀ NNBeginNegotiation(
int cookie,
int clientindex,
NegotiateProgressFunc progresscallback,
NegotiateCompletedFunc completedcallback,
void * userdata );
RoutineRequired HeaderDistribution
NNBeginNegotiation<natneg.h>SDKZIP

Return Value

ne_noerror if successful; otherwise one of the ne_ error values. See Remarks for detail.

Parameters

cookie
[in] Shared cookie value that both players will use so that the NAT Negotiation Server can match them up.
clientindex
[in] One client must use clientindex 0, the other must use clientindex 1.
progresscallback
[in] Callback function that will be called as the state changes.
completedcallback
[in] Callback function that will be called when negotiation is complete.
userdata
[in] Pointer for your own use that will be passed into the callback functions.

Remarks

Possible errors that can be returned when starting a negotiation
ne_noerror: No error
ne_allocerrortrong>: Memory allocation failed
>
ne_socketerror: Socket allocation failed
ne_dnserror: DNS lookup failed.