Client System API Reference
The System module provides some relatively scattered APIs and events.
API List
| API | Description |
|---|---|
| GetServerTime | Get the current UTC time of the server in seconds. |
Event List
| Event | Description |
|---|---|
| SetOnTssHandled | When some apis are called, if the api requires TSS information, this event will be triggered, and the game needs to return TSS information in this event. |
| SetOnGameCustomMsg | The event will be triggered when the game calls the HTTP API 'PushMsg'. |
API Details
GetServerTime
Get the current UTC time of the server in seconds.
/**
* Get the current UTC time of the server in seconds.
*
* @return The current UTC time of the server in seconds. The return value is 0 before logging in.
*/
int64_t GetServerTime();
Parameters:
(No parameters)
Return: int64_t
The current UTC time of the server in seconds. The return value is 0 before logging in.
Event Details
SetOnTssHandled
When some apis are called, if the api requires TSS information, this event will be triggered, and the game needs to return TSS information in this event.
/**
* OnSetOnTssHandled:
* When some apis are called, if the api requires TSS information, this event will be triggered, and the game needs to return TSS information in this event.
*
* @param in Contextual information of the API.
* @param out TSS information that needs to be returned.
*/
void SetOnTssHandled(
const TssHandledIn& in,
TssHandledOut& out);
Parameters:
| Param | Type | Description |
|---|---|---|
| in | const TssHandledIn& | Contextual information of the API. |
| out | TssHandledOut& | TSS information that needs to be returned. |
SetOnGameCustomMsg
The event will be triggered when the game calls the HTTP API 'PushMsg'.
/**
* OnSetOnGameCustomMsg:
* The event will be triggered when the game calls the HTTP API 'PushMsg'.
*
* @param event Info of the event.
*/
void SetOnGameCustomMsg(
const GameCustomMsgEvt& event);
Parameters:
| Param | Type | Description |
|---|---|---|
| event | const GameCustomMsgEvt& | Info of the event. |