gpConnectPreAuthenticated
This function is used to establish a connection to the server. It establishes a connection using an authtoken and a partnerchallenge, both obtained from a partner authentication system.
- GPResult gpConnectPreAuthenticated(
- GPConnection * connection,
- const gsi_char authtoken[GP_AUTHTOKEN_LEN],
- const gsi_char partnerchallenge[GP_PARTNERCHALLENGE_LEN],
- GPEnum firewall,
- GPEnum blocking,
- GPCallback callback,
- void * param );
Routine | Required Header | Distribution |
---|---|---|
gpConnectPreAuthenticated | <gp.h> | SDKZIP |
Return Value
This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.
Parameters
- connection
- [in] A GP interface object initialized with gpInitialize.
- authtoken
- [in] An authentication token generated by a partner database.
- partnerchallenge
- [in] The challenge received from the partner database.
- firewall
- [in] GP_FIREWALL or GO_NO_FIREWALL. This option may limit the users ability to send files.
- blocking
- [in] GP_BLOCKING or GP_NON_BLOCKING
- callback
- [in] A user-supplied callback with an arg type of GPConnectResponseArg
- param
- [in] Pointer to user-defined data. This value will be passed unmodified to the callback function.
Remarks
This function establishes a connection with the server. If the local machine is behind a firewall, the firewall parameter should be set to GP_FIREWALL so that buddy messages can be sent through the server.
gpDisconnect should be called when this connection is ready to be disconnected..
When the connection is complete, the callback will be called.
This function should only be used if the namespaceID parameter passed to gpInitialize was greater than 0.
Unicode Mappings
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
gpConnectPreAuthenticated | gpConnectPreAuthenticatedA | gpConnectPreAuthenticatedW |
gpConnectPreAuthenticatedW and gpConnectPreAuthenticatedA are UNICODE and ANSI mapped versions of gpConnectPreAuthenticated. The arguments of gpConnectPreAuthenticatedA are ANSI strings; those of gpConnectPreAuthenticatedW are wide-character strings.
Section Reference: Gamespy Presence SDK
See Also: GPConnectResponseArg