SBConnectToServerCallback
The callback provided to ServerBrowserConnectToServer. Gets called when the state of the connect attempt changes.
- typedef void (*SBConnectToServerCallback)(
- ServerBrowser sb,
- SBConnectToServerState state,
- SOCKET gameSocket,
- struct sockaddr_in * remoteaddr,
- void * instance );
Routine | Required Header | Distribution |
---|---|---|
SBConnectToServerCallback | <sb_serverbrowsing.h> | SDKZIP |
Parameters
- sb
- [in] The ServerBrowser object the callback is referring to.
- state
- [in] The state of the connect attempt.
- gameSocket
- [in] A UDP socket, ready for use to communicate with the server.
- remoteaddr
- [in] The address of the server.
- instance
- [in] User provided data.
Remarks
"instance" is any game-specific data you want passed to the callback function. For example, you can pass a structure pointer or object pointer for use within the CallBack. If you can access any needed data within the CallBack already, then you can just pass NULL for "instance".
Section Reference: Gamespy Server Browsing SDK
See Also: ServerBrowserConnectToServer