Class EOS_AntiCheatServer_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
- Since:
- 8/9/2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNotifyClientActionRequired(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnClientActionRequiredCallback notificationFn) Add a callback issued when an action must be applied to a connected client.addNotifyClientAuthStatusChanged(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnClientAuthStatusChangedCallback notificationFn) Add an optional callback issued when a connected client's authentication status changes.addNotifyMessageToClient(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnMessageToClientCallback notificationFn) Add a callback issued when a new message must be dispatched to a connected client.Begin the gameplay session.End the gameplay session.intgetProtectMessageOutputLength(int dataSize) Optional NetProtect feature for game message encryption.Optional Cerberus feature for gameplay data collection.logGameRoundEnd(int winningTeamId) Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.Optional Cerberus feature for gameplay data collection.protectMessage(EOS_AntiCheatCommon_ClientHandle clientHandle, byte[] data, int outBufferSizeBytes) Optional NetProtect feature for game message encryption.receiveMessageFromClient(@NotNull EOS_AntiCheatCommon_ClientHandle clientHandle, byte @NotNull [] data) Call when an anti-cheat message is received from a client.Register a connected client.Optional Cerberus feature for gameplay data collection.voidremoveNotifyClientActionRequired(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatServer_AddNotifyClientActionRequired handler.voidremoveNotifyClientAuthStatusChanged(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatServer_AddNotifyClientAuthStatusChanged handler.voidremoveNotifyMessageToClient(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatServer_AddNotifyMessageToClient handler.Optional.setClientNetworkState(EOS_AntiCheatCommon_ClientHandle clientHandle, boolean isNetworkActive) Optional.setGameSessionId(String gameSessionId) Optional.unprotectMessage(EOS_AntiCheatCommon_ClientHandle clientHandle, byte[] data) Optional NetProtect feature for game message encryption.unregisterClient(@NotNull EOS_AntiCheatCommon_ClientHandle clientHandle) Unregister a disconnected client.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_AntiCheatServer_Interface
public EOS_AntiCheatServer_Interface(com.sun.jna.Pointer address) -
EOS_AntiCheatServer_Interface
public EOS_AntiCheatServer_Interface()
-
-
Method Details
-
addNotifyMessageToClient
public EOS_NotificationId addNotifyMessageToClient(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnMessageToClientCallback notificationFn) Add a callback issued when a new message must be dispatched to a connected client. The bound function will only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.- Parameters:
clientData- This value is returned to the caller when NotificationFn is invokednotificationFn- The callback to be fired- Returns:
- A valid notification ID if successfully bound, or
EOS_NotificationId.EOS_INVALID_NOTIFICATIONIDotherwise
-
removeNotifyMessageToClient
Remove a previously bound EOS_AntiCheatServer_AddNotifyMessageToClient handler.- Parameters:
notificationId- The previously bound notification ID
-
addNotifyClientActionRequired
public EOS_NotificationId addNotifyClientActionRequired(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnClientActionRequiredCallback notificationFn) Add a callback issued when an action must be applied to a connected client. The bound function will only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.- Parameters:
clientData- This value is returned to the caller when NotificationFn is invokednotificationFn- The callback to be fired- Returns:
- A valid notification ID if successfully bound, or
EOS_NotificationId.EOS_INVALID_NOTIFICATIONIDotherwise
-
removeNotifyClientActionRequired
Remove a previously bound EOS_AntiCheatServer_AddNotifyClientActionRequired handler.- Parameters:
notificationId- The previously bound notification ID
-
addNotifyClientAuthStatusChanged
public EOS_NotificationId addNotifyClientAuthStatusChanged(com.sun.jna.Pointer clientData, EOS_AntiCheatServer_OnClientAuthStatusChangedCallback notificationFn) Add an optional callback issued when a connected client's authentication status changes. The bound function will only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.- Parameters:
clientData- This value is returned to the caller when NotificationFn is invokednotificationFn- The callback to be fired- Returns:
- A valid notification ID if successfully bound, or
EOS_NotificationId.EOS_INVALID_NOTIFICATIONIDotherwise
-
removeNotifyClientAuthStatusChanged
Remove a previously bound EOS_AntiCheatServer_AddNotifyClientAuthStatusChanged handler.- Parameters:
notificationId- The previously bound notification ID
-
beginSession
Begin the gameplay session. Event callbacks must be configured with EOS_AntiCheatServer_AddNotifyMessageToClient and EOS_AntiCheatServer_AddNotifyClientActionRequired before calling this function.- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the initialization succeededEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
endSession
End the gameplay session. Should be called when the server is shutting down or entering an idle state.- Returns:
EOS_EResult.EOS_Success- If the initialization succeededEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
registerClient
Register a connected client. Must be paired with a call to UnregisterClient.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the player was registered successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
unregisterClient
public EOS_EResult unregisterClient(@NotNull @NotNull EOS_AntiCheatCommon_ClientHandle clientHandle) Unregister a disconnected client.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
clientHandle- Locally unique value describing the remote user, as previously passed to RegisterClient- Returns:
EOS_EResult.EOS_Success- If the player was unregistered successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
receiveMessageFromClient
public EOS_EResult receiveMessageFromClient(@NotNull @NotNull EOS_AntiCheatCommon_ClientHandle clientHandle, byte @NotNull [] data) Call when an anti-cheat message is received from a client.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
clientHandle- Locally unique value describing the corresponding remote user, as previously passed to RegisterClientdata- The data received- Returns:
EOS_EResult.EOS_Success- If the message was processed successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_InvalidRequest- If message contents were corrupt and could not be processed
-
setClientDetails
Optional. Sets or updates client details including input device and admin status.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the flags were updated successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
setGameSessionId
Optional. Sets or updates a game session identifier which can be attached to other data for reference. The identifier can be updated at any time for currently and subsequently registered clients.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
gameSessionId- Game session identifier- Returns:
EOS_EResult.EOS_Success- If the game session identifier was set successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
setClientNetworkState
public EOS_EResult setClientNetworkState(EOS_AntiCheatCommon_ClientHandle clientHandle, boolean isNetworkActive) Optional. Can be used to indicate that a client is legitimately known to be temporarily unable to communicate, for example as a result of loading a new level.The IsNetworkActive flag must be set back to true when users enter normal gameplay, otherwise anti-cheat enforcement will not work correctly.
This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
clientHandle- Locally unique value describing the remote user (e.g. a player object pointer)isNetworkActive- true if the network is functioning normally, false if temporarily interrupted- Returns:
EOS_EResult.EOS_Success- If the network state was updated successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
getProtectMessageOutputLength
Optional NetProtect feature for game message encryption. Calculates the required decrypted buffer size for a given input data length. This will not change for a given SDK version, and allows one time allocation of reusable buffers.- Parameters:
dataSize- input data size- Returns:
- On success, the OutBuffer length in bytes that is required to call ProtectMessage on the given input size.
- Throws:
EOSInvalidParametersException- If input data was invalidEOSException
-
protectMessage
public ByteBuffer protectMessage(EOS_AntiCheatCommon_ClientHandle clientHandle, byte[] data, int outBufferSizeBytes) throws EOSException Optional NetProtect feature for game message encryption. Encrypts an arbitrary message that will be sent to a game client and decrypted on the other side.Options.Data and OutBuffer may refer to the same buffer to encrypt in place.
- Parameters:
clientHandle- Locally unique value describing the remote user to whom the message will be sentdata- The data to encryptoutBufferSizeBytes- The size in bytes of OutBuffer- Returns:
- buffer with an encrypted data message
- Throws:
EOSInvalidParametersException- If input data was invalidEOSInvalidUserException- If the specified ClientHandle was invalid or not currently registered. SeeregisterClient(EOS_AntiCheatServer_RegisterClientOptions)EOSException
-
unprotectMessage
public ByteBuffer unprotectMessage(EOS_AntiCheatCommon_ClientHandle clientHandle, byte[] data) throws EOSException Optional NetProtect feature for game message encryption. Decrypts an encrypted message received from a game client.Options.Data and OutBuffer may refer to the same buffer to decrypt in place.
- Parameters:
clientHandle- Locally unique value describing the remote user from whom the message was receiveddata- The data to decrypt- Returns:
- buffer with a decrypted data message
- Throws:
EOSInvalidParametersException- If input data was invalidEOSException
-
registerEvent
Optional Cerberus feature for gameplay data collection. Registers a custom gameplay event.All custom game events must be registered before EOS_AntiCheatServer_BeginSession is called for the first time. After the first call to EOS_AntiCheatServer_BeginSession, this function cannot be called any longer.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was registered successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalid
-
logEvent
Optional Cerberus feature for gameplay data collection. Logs a custom gameplay event.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logGameRoundStart
Optional Cerberus feature for gameplay data collection. Logs a new game round start.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logGameRoundEnd
Optional Cerberus feature for gameplay data collection. Logs a game round's end and outcome.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
winningTeamId- Optional identifier for the winning team- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerSpawn
Optional Cerberus feature for gameplay data collection. Logs a player spawning into the game.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerDespawn
Optional Cerberus feature for gameplay data collection. Logs a player despawning in the game, for example as a result of the character's death, switching to spectator mode, etc.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerRevive
Optional Cerberus feature for gameplay data collection. Logs a player being revived after being downed (see EOS_AntiCheatServer_LogPlayerTakeDamage options).This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerTick
Optional Cerberus feature for gameplay data collection. Logs a player's general state including position and view direction.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerUseWeapon
Optional Cerberus feature for gameplay data collection. Logs that a player has used a weapon, for example firing one bullet or making one melee attack.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerUseAbility
Optional Cerberus feature for gameplay data collection. Logs that a player has used a special ability or item which affects their character's capabilities, for example temporarily increasing their speed or allowing them to see nearby players behind walls.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-
logPlayerTakeDamage
Optional Cerberus feature for gameplay data collection. Logs that a player has taken damage.This function may only be called between a successful call to EOS_AntiCheatServer_BeginSession and the matching EOS_AntiCheatServer_EndSession call.
- Parameters:
options- Structure containing input data.- Returns:
EOS_EResult.EOS_Success- If the event was logged successfullyEOS_EResult.EOS_InvalidParameters- If input data was invalidEOS_EResult.EOS_NotConfigured- If called outside of BeginSession/EndSession boundaries
-