TGDSO Gameserver

TGDSO Gameserver

Game Servers register to the TGDS HTTP Server so that Game Clients that are looking for a Game Server to join can select and connect.

Using an example Server Register Transaction below, we’ll explain it’s structure:

Request

JSON-RPCParametersRequiredDatatypeDescription
{"jsonrpc":"2.0", 
"method":"Server_REGISTER", 
"params":{ 
 "id":"",xintUnique ID.
 "name":"",xstringServer Name
 "ipdns":"",xstringIP or Domain
 "port":"",xstringPort
 "map":"",xstringMap
 "gamemode":"",xstringGamemode
 "max_participants":"",xintMax Players
 "participants":"",xintCurrent Players
 "start_time":""datetimeServer Starttime
 "stop_time":""datetimeServer Stoptime
}, 
"id": 1} 

Request

JSON-RPCParametersRequiredDatatypeDescription
{"jsonrpc":"2.0", 
"method":"Server_OPTION", 
"params":{ 
 "id":"",xintUnique ID.
 "name":"",stringServer Name
 "ipdns":"",stringIP or Domain
 "port":"",stringPort
 "map":"",stringMap
 "gamemode":"",stringGamemode
 "max_participants":"",xintMax Players
 "participants":"",xintCurrent Players
 "start_time":""datetimeServer Starttime
 "stop_time":""datetimeServer Stoptime
}, 
"id": 1} 

The “Server_OPTION” Method used for keep alive (Ping) uses the same API Call with name, ipdns, port, map, gamemode, time fields optional.

Response

If Authentication of the Server REGISTER Transaction is successful, the TGDSO Contests Servers will respond with a Signature for use in the next Transaction. See Signature:

JSON-RPCParametersRequiredDatatypeDescription
{"jsonrpc":"2.0", 
"result": { 
 "signature":"3208fde0470719372f8313ddd5884a75"xhashSigned Authentication Token issued by TGDSO Contest Server.
}, 
"id": 1} 

Otherwise, if the Authentication fails, the result is an Failure code is in the response:

JSON-RPCParametersRequiredDatatypeDescription
{"jsonrpc":"2.0", 
"result":{ 
 "failure":1xintegerFailure Code 1: Authentication Failed. Incorrect Username/Password Combination.
}, 
"id": 1} 

TGDSO Game Server Response will always contain a Signature on success or an Failure Code on failure. Note: RPC Call with Invalid JSON  will receive the applicable JSON-RPC error Responses:

{"jsonrpc": "2.0", "error": {"code": -32601, "message": "Method not found"}, "id": "1"}
{"jsonrpc": "2.0", "error": {"code": -32700, "message": "Parse error"}, "id": null}

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest