ServerBrowserConnectToServer

GameSpy SDK

ServerBrowserConnectToServer

Connects to a game server.

SBError ServerBrowserConnectToServer(
ServerBrowser sb,
SBServer server,
SBConnectToServerCallback callback );
RoutineRequired HeaderDistribution
ServerBrowserConnectToServer<sb_serverbrowsing.h>SDKZIP

Return Value

This function returns sbe_noerror for success. On an error condition, this function will return an SBError code. If there is an error, the callback will not be called.

Parameters

sb
[in] ServerBrowser object returned from ServerBrowserNew.
server
[in] SBServer object for the server to connect to.
callback
[in] The callback to call when the attempt completes.

Remarks

Connects to a game server, internally using Nat Negotiation if necessary. The callback will be called when the connection attempt completes. If the attempt is successful, the server will have its qr2_clientconnectedcallback_t called.