chatConnectLogin

GameSpy SDK

chatConnectLogin

Initializes the Chat SDK and initiates a connection to the chat server. The chatConnectLogin function provides the ability to login to chat using a registered unique nickname.

CHAT chatConnectLogin(
const gsi_char * serverAddress,
int port,
int namespaceID,
const gsi_char * email,
const gsi_char * profilenick,
const gsi_char * uniquenick,
const gsi_char * password,
const gsi_char * name,
const gsi_char * gamename,
const gsi_char * secretKey,
chatGlobalCallbacks * callbacks,
chatNickErrorCallback nickErrorCallback,
chatFillInUserCallback fillInUserCallback,
chatConnectCallback connectCallback,
void * param,
CHATBool blocking );
RoutineRequired HeaderDistribution
chatConnectLogin<chat.h>SDKZIP

Return Value

This function returns the initialized Chat SDK interface. A return value of NULL indicates an error.

Parameters

serverAddress
[in] Address of the chat server being connect to; usually "peerchat.gamespy.com".
port
[in] Port of the chat server; usually 6667.
namespaceID
[in] ID of the unique name namespace in which the users nickname is registered.
email
[in] E-mail address of the local client's GameSpy profile.
profilenick
[in] Nickname used when creating profile.  May be different from the registered unique nick.
uniquenick
[in] Unique nickname registered to the profile with which user is logging in.
password
[in] Password of the GameSpy profile.
name
[in] User’s real name, or any other optional info.
gamename
[in] Assigned gamename from which the local client is logging in.
secretKey
[in] Assigned secret key for the specified gamename.
callbacks
[in] Structure for specifying global handlers.
nickErrorCallback
[in] Optional user-supplied function to be called if nickname is invalid or in use.
fillInUserCallback
[in] Optional user-supplied function to be called when the SDK requires the user name.
connectCallback
[in] Optional user-supplied function to be called when the operation has completed.
param
[in] Optional pointer to user data; will be passed unmodified to the callback function.
blocking
[in] If CHATTrue, return only after the operation has completed; otherwise, return immediately.

Remarks

The server address and port for the connect functions can be left empty. In other words, serverAddress can be NULL, and the port can be specified to be 0. The SDK will automatically take care of using the default address and port.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
chatConnectLoginchatConnectLoginAchatConnectLoginW

chatConnectLoginW and chatConnectLoginA are UNICODE and ANSI mapped versions of chatConnectLogin. The arguments of chatConnectLoginA are ANSI strings; those of chatConnectLoginW are wide-character strings.