This function is part of the AntiCheatClient Interface.
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 {BeginSession} and the matching {EndSession} call in mode {AntiCheatClientMode.ClientServer}.
Mode: {AntiCheatClientMode.ClientServer}.
Return Value
A valid notification ID if successfully bound, or {Common.InvalidNotificationid} otherwise
Parameters
AntiCheatClient.AntiCheatClientInterface.AddNotifyMessageToServer
Parameter Type And Name
|
Usage Information
|
AddNotifyMessageToServerOptions options
|
Structure containing input data
|
object clientData
|
This value is returned to the caller when NotificationFn is invoked
|
OnMessageToServerCallback notificationFn
|
The callback to be fired
|
This function enables your callback (the NotificationFn
parameter) to respond to events that happen on the back-end service. Remember to remove your callback function when it is no longer needed.
Because this function is asynchronous, it employs a callback of type AntiCheatClient.OnMessageToServerCallback to report the results of its operation. See the AntiCheatClient.OnMessageToServerCallbackInfo page for more details, or check the Callback Data section below.
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 {AntiCheatServer.AntiCheatServerInterface.ReceiveMessageFromClient} function.
This callback is always issued from within {Platform.PlatformInterface.Tick} on its calling thread.
Callback Parameters
AntiCheatClient.OnMessageToServerCallback
Parameter Type And Name
|
Usage Information
|
OnMessageToServerCallbackInfo data
|
|
Callback Data
The EOS SDK passes the following data structure to the callback function:
AntiCheatClient.OnMessageToServerCallbackInfo
Property
|
Value
|
object ClientData
|
Caller-specified context data
|
byte[] MessageData
|
The message data that must be sent to the server
|
For more information, see the AntiCheatClient.OnMessageToServerCallbackInfo page.