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 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 to beginSession(EOS_ProductUserId, EOS_EAntiCheatClientMode) and the matching endSession() call in mode EOS_ACCM_ClientServer.

      Mode: EOS_EAntiCheatClientMode.EOS_ACCM_ClientServer.

      Parameters:
      clientData - This value is returned to the caller when NotificationFn is invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyMessageToServer

      public void removeNotifyMessageToServer(EOS_NotificationId notificationId)
      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 invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyMessageToPeer

      public void removeNotifyMessageToPeer(EOS_NotificationId notificationId)
      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 invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyPeerActionRequired

      public void removeNotifyPeerActionRequired(EOS_NotificationId notificationId)
      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 invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyPeerAuthStatusChanged

      public void removeNotifyPeerAuthStatusChanged(EOS_NotificationId notificationId)
      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 invoked
      notificationFn - The callback to be fired
      Returns:
      A valid notification ID if successfully bound, or EOS_NotificationId.EOS_INVALID_NOTIFICATIONID otherwise
    • removeNotifyClientIntegrityViolated

      public void removeNotifyClientIntegrityViolated(EOS_NotificationId notificationId)
      Remove a previously bound EOS_AntiCheatClient_AddNotifyClientIntegrityViolated handler.
      Mode: Any.
      Parameters:
      notificationId - The previously bound notification ID
    • beginSession

      public EOS_EResult beginSession(EOS_ProductUserId productUserId, EOS_EAntiCheatClientMode mode)
      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 functions
      mode - Operating mode
      Returns:
      EOS_EResult.EOS_Success - If the session was started successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_AntiCheat_InvalidMode - If the current mode does not support this function
    • endSession

      public EOS_EResult endSession()
      Ends a multiplayer game session, either by leaving an ongoing session or shutting it down entirely.
      Mode: All

      Must 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 normally EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_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 successfully EOS_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 successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_InvalidRequest - If message contents were corrupt and could not be processed EOS_EResult.EOS_AntiCheat_InvalidMode - If the current mode does not support this function
    • getProtectMessageOutputLength

      public int getProtectMessageOutputLength(int dataSize) throws EOSException
      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 invalid
      EOSAntiCheatInvalidModeException - If the current mode does not support this function
      EOSException
    • protectMessage

      public ByteBuffer protectMessage(byte @NotNull [] data, int outBufferSizeBytes) throws EOSException
      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 encrypt
      outBufferSizeBytes - The size in bytes of OutBuffer
      Returns:
      buffer with an encrypted data message
      Throws:
      EOSInvalidParametersException - If input data was invalid
      EOSAntiCheatInvalidModeException - If the current mode does not support this function
      EOSException
    • unprotectMessage

      public ByteBuffer unprotectMessage(byte[] data) throws EOSException
      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 invalid
      EOSAntiCheatInvalidModeException - If the current mode does not support this function
      EOSException
    • 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 successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_AntiCheat_InvalidMode - If the current mode does not support this function
    • unregisterPeer

      public EOS_EResult unregisterPeer(EOS_AntiCheatClient_UnregisterPeerOptions options)
      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 successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_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 successfully EOS_EResult.EOS_InvalidParameters - If input data was invalid EOS_EResult.EOS_AntiCheat_InvalidMode - If the current mode does not support this function