ServerBrowserGetMyPublicIPAddr

GameSpy SDK

ServerBrowserGetMyPublicIPAddr

Returns the local client's external (firewall) address.

unsigned int ServerBrowserGetMyPublicIPAddr(
ServerBrowser sb );
RoutineRequired HeaderDistribution
ServerBrowserGetMyPublicIPAddr<sb_serverbrowsing.h>SDKZIP

Return Value

The local clients external (firewall) address. This may be returned as a string or integer address.

Parameters

sb
[in] ServerBrowser object intialized with ServerBrowserNew

Remarks

The ServerBrowserGetMyPublicIP and ServerBrowserGetMyPublicIPAddr functions return the external address of the local client, as report by the GameSpy Master Server. Because of this, the return value is only valid after a successful call to ServerBrowserUpdate. The reason for this is that a client cannot determine their external address without first sending an outgoing packet. It is up to the receiver of that packet to report the public address back to the local client.