ServerBrowserLANUpdate

GameSpy SDK

ServerBrowserLANUpdate

Retrieves the current list of games broadcasting on the local network.

SBError ServerBrowserLANUpdate(
ServerBrowser sb,
SBBool async,
unsigned short startSearchPort,
unsigned short endSearchPort );
RoutineRequired HeaderDistribution
ServerBrowserLANUpdate<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.
async
[in] When set to SBTrue this function will run in non-blocking mode.
startSearchPort
[in] The lowest port the SDK will listen to broadcasts from, in network byte order.
endSearchPort
[in] The highest port the SDK will listen to broadcasts from, in network byte order.

Remarks

The ServerBrowserLANUpdate function listens for broadcast packets on the local network.  Servers that are broadcasting within the specified port range will be detected.  As each server broadcast is received, one corresponding call to the SBCallbackfunction will be made with the status sbc_serveradded.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
ServerBrowserLANUpdateServerBrowserLANUpdateAServerBrowserLANUpdateW

ServerBrowserLANUpdateW and ServerBrowserLANUpdateA are UNICODE and ANSI mapped versions of ServerBrowserLANUpdate. The arguments of ServerBrowserLANUpdateA are ANSI strings; those of ServerBrowserLANUpdateW are wide-character strings.