InitStatsConnection
Connects to the Persistent Storage server.
- int InitStatsConnection(
- int gameport );
Routine | Required Header | Distribution |
---|---|---|
InitStatsConnection | <gpersist.h> | SDKZIP |
Return Value
Returns GE_NOERROR if connection succeeded, else one of the GE_ error codes. See Remarks.
Parameters
- gameport
- [in] The game port that the host is running on.
Remarks
If your game doesn’t use multiple ports (or doesn’t support more than one host per machine) then you can just use 0 for the gameport parameter.
If the connection fails, all Persistent Storage functions will fail.
Possible return errors include:
GE_NODNS: Unable to resolve stats server DNS
GE_NOSOCKET: Unable to create data socket
GE_NOCONNECT: Unable to connect to stats server
GE_DATAERROR: Unable to receive challenge from stats server, or bad challenge
GE_NOERROR: Connected to stats server and ready to send data.
Section Reference: Gamespy Persistent Storage SDK
See Also: CloseStatsConnection