跳到主要内容

Client System API Reference

The System module provides some relatively scattered APIs and events.

API List

APIDescription
GetServerTimeGet the current UTC time of the server in seconds.

Event List

EventDescription
OnTssHandledWhen 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.
OnGameCustomMsgThe 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 GetServerTime() const;

Parameters:

(No parameters)

Return: int64

The current UTC time of the server in seconds. The return value is 0 before logging in.

Event Details

OnTssHandled

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.

/**
* OnTssHandled:
* 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.
*/
DECLARE_DELEGATE_TwoParams(FOnTssHandled, const FPgosClientTssHandledIn& /*In*/, FPgosClientTssHandledOut& /*Out*/);
FOnTssHandled& OnTssHandled() { return TssHandledDelegate; }

Type Reference:

OnGameCustomMsg

The event will be triggered when the game calls the HTTP API 'PushMsg'.

/**
* OnGameCustomMsg:
* The event will be triggered when the game calls the HTTP API 'PushMsg'.
*
* @param Event Info of the event.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnGameCustomMsg, const FPgosClientGameCustomMsgEvt& /*Event*/);
FOnGameCustomMsg& OnGameCustomMsg() { return GameCustomMsgDelegate; }

Type Reference: