Package host.anzo.eossdk.eos.sdk
Class EOS_AntiCheatClient_Interface
java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_AntiCheatClient_Interface
- All Implemented Interfaces:
com.sun.jna.NativeMapped
public class EOS_AntiCheatClient_Interface
extends com.sun.jna.PointerType
The Anti-Cheat client Interface is used to implement anti-cheat interface at game client side
- Since:
- 8/15/2023
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionOptional.addNotifyClientIntegrityViolated
(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnClientIntegrityViolatedCallback notificationFn) Add a callback when a message must be displayed to the local client informing them on a local integrity violation, which will prevent further online play.
Mode: Any.addNotifyMessageToPeer
(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnMessageToPeerCallback notificationFn) Add a callback issued when a new message must be dispatched to a connected peer.addNotifyMessageToServer
(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnMessageToServerCallback notificationFn) Add a callback issued when a new message must be dispatched to the game server.addNotifyPeerActionRequired
(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnPeerActionRequiredCallback notificationFn) Add a callback issued when an action must be applied to a connected client.addNotifyPeerAuthStatusChanged
(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnPeerAuthStatusChangedCallback notificationFn) Add an optional callback issued when a connected peer's authentication status changes.beginSession
(EOS_ProductUserId productUserId, EOS_EAntiCheatClientMode mode) Begins a multiplayer game session.Ends a multiplayer game session, either by leaving an ongoing session or shutting it down entirely.
Mode: Allint
getProtectMessageOutputLength
(int dataSize) Optional NetProtect feature for game message encryption.protectMessage
(byte @NotNull [] data, int outBufferSizeBytes) Optional NetProtect feature for game message encryption.Call when an anti-cheat message is received from a peer.
Mode: EOS_ACCM_PeerToPeer.Call when an anti-cheat message is received from the game server.
Mode: EOS_ACCM_ClientServer.Registers a connected peer-to-peer client.
Mode: EOS_ACCM_PeerToPeer.void
removeNotifyClientIntegrityViolated
(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatClient_AddNotifyClientIntegrityViolated handler.
Mode: Any.void
removeNotifyMessageToPeer
(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatClient_AddNotifyMessageToPeer handler.
Mode: Any.void
removeNotifyMessageToServer
(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatClient_AddNotifyMessageToServer handler.
Mode: Any.void
removeNotifyPeerActionRequired
(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatClient_AddNotifyPeerActionRequired handler.
Mode: Any.void
removeNotifyPeerAuthStatusChanged
(EOS_NotificationId notificationId) Remove a previously bound EOS_AntiCheatClient_AddNotifyPeerAuthStatusChanged handler.
Mode: Any.unprotectMessage
(byte[] data) Optional NetProtect feature for game message encryption.Unregisters a disconnected peer-to-peer client.
Mode: EOS_ACCM_PeerToPeer.Methods inherited from class com.sun.jna.PointerType
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
-
Constructor Details
-
EOS_AntiCheatClient_Interface
public EOS_AntiCheatClient_Interface(com.sun.jna.Pointer address) -
EOS_AntiCheatClient_Interface
public EOS_AntiCheatClient_Interface()
-
-
Method Details
-
addNotifyMessageToServer
public EOS_NotificationId addNotifyMessageToServer(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnMessageToServerCallback notificationFn) 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 tobeginSession(EOS_ProductUserId, EOS_EAntiCheatClientMode)
and the matchingendSession()
call in mode EOS_ACCM_ClientServer.- 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_NOTIFICATIONID
otherwise
-
removeNotifyMessageToServer
Remove a previously bound EOS_AntiCheatClient_AddNotifyMessageToServer handler.
Mode: Any.- Parameters:
notificationId
- The previously bound notification ID
-
addNotifyMessageToPeer
public EOS_NotificationId addNotifyMessageToPeer(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnMessageToPeerCallback notificationFn) Add a callback issued when a new message must be dispatched to a connected peer. 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_PeerToPeer.
Mode: EOS_ACCM_PeerToPeer.- 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_NOTIFICATIONID
otherwise
-
removeNotifyMessageToPeer
Remove a previously bound EOS_AntiCheatClient_AddNotifyMessageToPeer handler.
Mode: Any.- Parameters:
notificationId
- The previously bound notification ID
-
addNotifyPeerActionRequired
public EOS_NotificationId addNotifyPeerActionRequired(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnPeerActionRequiredCallback 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_AntiCheatClient_BeginSession and the matching EOS_AntiCheatClient_EndSession call in mode EOS_ACCM_PeerToPeer.
Mode: EOS_ACCM_PeerToPeer.- 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_NOTIFICATIONID
otherwise
-
removeNotifyPeerActionRequired
Remove a previously bound EOS_AntiCheatClient_AddNotifyPeerActionRequired handler.
Mode: Any.- Parameters:
notificationId
- The previously bound notification ID
-
addNotifyPeerAuthStatusChanged
public EOS_NotificationId addNotifyPeerAuthStatusChanged(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnPeerAuthStatusChangedCallback notificationFn) Add an optional callback issued when a connected peer's authentication status changes. 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_PeerToPeer.
Mode: EOS_ACCM_PeerToPeer.- 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_NOTIFICATIONID
otherwise
-
removeNotifyPeerAuthStatusChanged
Remove a previously bound EOS_AntiCheatClient_AddNotifyPeerAuthStatusChanged handler.
Mode: Any.- Parameters:
notificationId
- The previously bound notification ID
-
addNotifyClientIntegrityViolated
public EOS_NotificationId addNotifyClientIntegrityViolated(com.sun.jna.Pointer clientData, EOS_AntiCheatClient_OnClientIntegrityViolatedCallback notificationFn) Add a callback when a message must be displayed to the local client informing them on a local integrity violation, which will prevent further online play.
Mode: Any.- 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_NOTIFICATIONID
otherwise
-
removeNotifyClientIntegrityViolated
Remove a previously bound EOS_AntiCheatClient_AddNotifyClientIntegrityViolated handler.
Mode: Any.- Parameters:
notificationId
- The previously bound notification ID
-
beginSession
Begins a multiplayer game session. After this call returns successfully, the client is ready to exchange anti-cheat messages with a game server or peer(s). When leaving one game session and connecting to a different one, a new anti-cheat session must be created by calling EOS_AntiCheatClient_EndSession and EOS_AntiCheatClient_BeginSession again.
Mode: All- Parameters:
productUserId
- Logged in user identifier from earlier call to EOS_Connect_Login family of functionsmode
- Operating mode- Returns:
EOS_EResult.EOS_Success
- If the session was started successfullyEOS_EResult.EOS_InvalidParameters
- If input data was invalidEOS_EResult.EOS_AntiCheat_InvalidMode
- If the current mode does not support this function
-
endSession
Ends a multiplayer game session, either by leaving an ongoing session or shutting it down entirely.
Mode: AllMust be called when the multiplayer session ends, or when the local user leaves a session in progress.
- Returns:
EOS_EResult.EOS_Success
- If the session was ended normallyEOS_EResult.EOS_InvalidParameters
- If input data was invalidEOS_EResult.EOS_AntiCheat_InvalidMode
- If the current mode does not support this function
-
addExternalIntegrityCatalog
public EOS_EResult addExternalIntegrityCatalog(EOS_AntiCheatClient_AddExternalIntegrityCatalogOptions options) Optional. Adds an integrity catalog and certificate pair from outside the game directory, for example to support mods that load from elsewhere.
Mode: All- Parameters:
options
- Structure containing input data.- Returns:
EOS_EResult.EOS_Success
- If the integrity catalog was added successfullyEOS_EResult.EOS_InvalidParameters
- If input data was invalid
-
receiveMessageFromServer
public EOS_EResult receiveMessageFromServer(EOS_AntiCheatClient_ReceiveMessageFromServerOptions options) Call when an anti-cheat message is received from the game server.
Mode: EOS_ACCM_ClientServer.- Parameters:
options
- Structure containing input data.- 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 processedEOS_EResult.EOS_AntiCheat_InvalidMode
- If the current mode does not support this function
-
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.
Mode: EOS_ACCM_ClientServer.- 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 invalidEOSAntiCheatInvalidModeException
- If the current mode does not support this functionEOSException
-
protectMessage
Optional NetProtect feature for game message encryption. Encrypts an arbitrary message that will be sent to the game server and decrypted on the other side.
Mode: EOS_ACCM_ClientServer.options.Data and OutBuffer may refer to the same buffer to encrypt in place.
- Parameters:
data
- The data to encryptoutBufferSizeBytes
- The size in bytes of OutBuffer- Returns:
- buffer with an encrypted data message
- Throws:
EOSInvalidParametersException
- If input data was invalidEOSAntiCheatInvalidModeException
- If the current mode does not support this functionEOSException
-
unprotectMessage
Optional NetProtect feature for game message encryption. Decrypts an encrypted message received from the game server.
Mode: EOS_ACCM_ClientServer.options.Data and OutBuffer may refer to the same buffer to decrypt in place.
- Parameters:
data
- The data to decrypt- Returns:
- buffer with a decrypted data message
- Throws:
EOSInvalidParametersException
- If input data was invalidEOSAntiCheatInvalidModeException
- If the current mode does not support this functionEOSException
-
registerPeer
Registers a connected peer-to-peer client.
Mode: EOS_ACCM_PeerToPeer.Must be paired with a call to EOS_AntiCheatClient_UnregisterPeer if this user leaves the session in progress, or EOS_AntiCheatClient_EndSession if the entire session is ending.
- Parameters:
options
- Structure containing input data.- Returns:
EOS_EResult.EOS_Success
- If the player was registered successfullyEOS_EResult.EOS_InvalidParameters
- If input data was invalidEOS_EResult.EOS_AntiCheat_InvalidMode
- If the current mode does not support this function
-
unregisterPeer
Unregisters a disconnected peer-to-peer client.
Mode: EOS_ACCM_PeerToPeer.Must be called when a user leaves a session in progress.
- Parameters:
options
- Structure containing input data.- Returns:
EOS_EResult.EOS_Success
- If the player was unregistered successfullyEOS_EResult.EOS_InvalidParameters
- If input data was invalidEOS_EResult.EOS_AntiCheat_InvalidMode
- If the current mode does not support this function
-
receiveMessageFromPeer
public EOS_EResult receiveMessageFromPeer(EOS_AntiCheatClient_ReceiveMessageFromPeerOptions options) Call when an anti-cheat message is received from a peer.
Mode: EOS_ACCM_PeerToPeer.- Parameters:
options
- Structure containing input data.- Returns:
EOS_EResult.EOS_Success
- If the message was processed successfullyEOS_EResult.EOS_InvalidParameters
- If input data was invalidEOS_EResult.EOS_AntiCheat_InvalidMode
- If the current mode does not support this function
-