ServerBrowserSendNatNegotiateCookieToServer

GameSpy SDK

ServerBrowserSendNatNegotiateCookieToServer

Sends a nat negotiation cookie to the server.  The cookie is sent via the master server.

SBError ServerBrowserSendNatNegotiateCookieToServer(
ServerBrowser sb,
const gsi_char * ip,
unsigned short port,
int cookie );
RoutineRequired HeaderDistribution
ServerBrowserSendNatNegotiateCookieToServer<sb_serverbrowsing.h>SDKZIP

Return Value

If an error occurs, a valid SBError error code is returned. Otherwise, sbe_noerror is returned.

Parameters

sb
[in] ServerBrowser object intialized with ServerBrowserNew.
ip
[in] Address of the server in string form.  "xxx.xxx.xxx.xxx"
port
[in] The query port of the server to relay the NatNeg cookie to, in network byte order.
cookie
[in] An integer cookie value. See remarks.

Remarks

The ServerBrowserSendNatNegotiateCookieToServer function can be used to relay a NatNegotiation cookie value to a server behind a firewall.   This cookie is sent through the backend since direct communication with the server is not always possible.  This cookie may then be used to initiate a nat negotiation attempt.  Please refer to the NatNegotiation SDK documentation for more info.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
ServerBrowserSendNatNegotiateCookieToServerServerBrowserSendNatNegotiateCookieToServerAServerBrowserSendNatNegotiateCookieToServerW

ServerBrowserSendNatNegotiateCookieToServerW and ServerBrowserSendNatNegotiateCookieToServerA are UNICODE and ANSI mapped versions of ServerBrowserSendNatNegotiateCookieToServer. The arguments of ServerBrowserSendNatNegotiateCookieToServerA are ANSI strings; those of ServerBrowserSendNatNegotiateCookieToServerW are wide-character strings.