46 lines
4.6 KiB
HTML
46 lines
4.6 KiB
HTML
<HTML>
|
|
|
|
<HEAD>
|
|
<TITLE>Ubi.com GameService SDK</TITLE>
|
|
<LINK href="./gs-sdk-doc.css" rel="stylesheet" type="text/css">
|
|
</HEAD>
|
|
|
|
<BODY >
|
|
<!-- Generated by Doxygen 1.3.4 -->
|
|
<div class="qindex"><a class="qindexHL" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
|
|
<h1>gs-sdk-cdkey </h1>
|
|
<p>
|
|
<h2><a class="anchor" name="intro">
|
|
Introduction</a></h2>
|
|
ubi.com cd key validation system interface<h2><a class="anchor" name="description">
|
|
Description</a></h2>
|
|
This sdk provides functionalities for a game developper to add a cd key validation mechanism in his project. This system works along the ubi.com validation server.<p>
|
|
It includes game server side functionalities:<ul>
|
|
<li>Get a player validation status</li><li>Inform the validation server of the player status</li></ul>
|
|
<p>
|
|
and game client side functionalities:<ul>
|
|
<li>Request cd key activation (once)</li><li>Request cd key validation</li></ul>
|
|
<p>
|
|
<b>Note for game client side:</b><br>
|
|
The cd key activation is done once before the first cd key athorization request. After requesting for a cd key activation , the user will receive a activation id that should be kept safely to be use in all futur authorization request before joining a game server.<p>
|
|
<b>Note for game server side:</b><br>
|
|
The game server will need to ask the validation server for a player validation status (VALID or INVALID) before choosing to disconnect or to keep the player, this is done after the game server has received the authorization id of the game client that want to join.<p>
|
|
These are the chronological steps needed to be accomplish in a client validation from a game server and game client point of view. The first step(1) must be accomplish only once, when the game client does not possess his ACTIVATION ID.<p>
|
|
1. The game client get his ACTIVATION ID from the validation server using the <a class="el" href="group__group3.html#a0">GSCDKey_RequestActivation()</a> function call. <b>This is done once</b> or if the client does not possess a ACTIVATION ID. The ACTIVATION ID should be kept localy in a file or in the registry for further access.<p>
|
|
2. The game client get his AUTHORIZATION ID from the validation server using the <a class="el" href="group__group3.html#a1">GSCDKey_RequestAuthorization()</a> function call. This step will be done every time a client want to join a game server, the client needs a new authorization id each time he want to join a game server. If this call fails the client has 2 choice:<ul>
|
|
<li>send the request again using <a class="el" href="group__group3.html#a1">GSCDKey_RequestAuthorization()</a> using a bigger timeout value (if the error was caused by a timeout)</li><li>use the last authorization id received the last time the user joined a game server. (there is a chance that the validation of this old authorization id will fail if the latter has timed-out on the validation server side)</li></ul>
|
|
<p>
|
|
3. After connecting to the game server, the game client send his AUTHORIZATION ID to the game server.<p>
|
|
4. After the game server have received a client connection and AUTHORIZATION ID, he validate the client using the <a class="el" href="group__group2.html#a0">GSCDKey_ValidateUser()</a> function call. The status of the player (CDKEY_PLAYER_STATUS) will be returned via the callback <a class="el" href="group__group5.html#a0">CBCDKey_RcvValidationResponse()</a>. If this request does not succeed, and that the error code is ERRORCDKEY_TIMEOUT it is recommended that the request be sent again with a bigger timeout value. If a ERRORCDKEY_TIMEOUT error still occurs after that, the ubi.com network may have problems. It is however recommended that the game server does not let the player connect. Otherwise, it may lead to :<ul>
|
|
<li>hacks in the game to force a timeout</li><li>attacks on ubi.com server to have request time out</li></ul>
|
|
<p>
|
|
Recommendations after the game server has receive the player status via the <a class="el" href="group__group2.html#a0">GSCDKey_ValidateUser()</a> callback:<ul>
|
|
<li>if the player status is E_PLAYER_UNKNOWN or E_PLAYER_INVALID the game server should disconnect the player.</li><li>if the player status is E_PLAYER_VALID the game server should keep the player. </li></ul>
|
|
<hr>
|
|
<p align="right">
|
|
<i>Ubi.com GameService SDK - ©UbiSoft Entertainment 2002 </i><br>
|
|
<i><a href="mailto:gsdevteam@ubisoft.com">GameService development team</a></i>
|
|
</p>
|
|
</body>
|
|
</html>
|