EOS_AntiCheatClient_AddNotifyMessageToServer

EOS API reference page for EOS_AntiCheatClient_AddNotifyMessageToServer

4 分で読める

This function is part of the AntiCheatClient Interface.

Remarks

Add a callback issued when a new message must be dispatched to the game server. The bound function will only be called between a successful call to EOS_AntiCheatClient_BeginSession and the matching EOS_AntiCheatClient_EndSession call in mode EOS_ACCM_ClientServer. Mode: EOS_ACCM_ClientServer.

Return Value

A valid notification ID if successfully bound, or EOS_INVALID_NOTIFICATIONID otherwise

Parameters

EOS_AntiCheatClient_AddNotifyMessageToServer

Parameter Type And NameUsage Information
EOS_HAntiCheatClient Handle
const EOS_AntiCheatClient_AddNotifyMessageToServerOptions* OptionsStructure containing input data
void* ClientDataThis value is returned to the caller when NotificationFn is invoked
EOS_AntiCheatClient_OnMessageToServerCallback NotificationFnThe callback to be fired

Callback Function Information

Because this function is asynchronous, it employs a callback of type EOS_AntiCheatClient_OnMessageToServerCallback to report the results of its operation. See the EOS_AntiCheatClient_OnMessageToServerCallbackInfo page for more details, or check the [Callback Data] section below.

Callback Remarks

Callback issued when a new message must be dispatched to the game server. Messages contain opaque binary data of up to 256 bytes and must be transmitted to the game server using the game's own networking layer, then delivered to the server anti-cheat instance using the EOS_AntiCheatServer_ReceiveMessageFromClient function. This callback is always issued from within EOS_Platform_Tick on its calling thread.

Callback Parameters

EOS_AntiCheatClient_OnMessageToServerCallback

Parameter Type And NameUsage Information
const EOS_AntiCheatClient_OnMessageToServerCallbackInfo* Data

Callback Data

The EOS SDK passes the following data structure to the callback function:

EOS_AntiCheatClient_OnMessageToServerCallbackInfo

PropertyValue
void* ClientDataCaller-specified context data
const void* MessageDataThe message data that must be sent to the server
uint32_t MessageDataSizeBytesThe size in bytes of MessageData

For more information, see the EOS_AntiCheatClient_OnMessageToServerCallbackInfo page.