ServerBrowserLANUpdate
Retrieves the current list of games broadcasting on the local network.
- SBError ServerBrowserLANUpdate(
- ServerBrowser sb,
- SBBool async,
- unsigned short startSearchPort,
- unsigned short endSearchPort );
Routine | Required Header | Distribution |
---|---|---|
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
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
ServerBrowserLANUpdate | ServerBrowserLANUpdateA | ServerBrowserLANUpdateW |
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.
Section Reference: Gamespy Server Browsing SDK
See Also: ServerBrowserNew, ServerBrowserUpdate