Class EOSAntiCheatClientManager
- Namespace
- PlayEveryWare.EpicOnlineServices.Samples
Class EOSAntiCheatClientManager
is a simplified wrapper for EOS AntiCheat Client Interface.
public class EOSAntiCheatClientManager : IEOSSubManager, IConnectInterfaceEventListener, IAuthInterfaceEventListener
- Inheritance
-
EOSAntiCheatClientManager
- Implements
-
IConnectInterfaceEventListenerIAuthInterfaceEventListener
Constructors
EOSAntiCheatClientManager()
public EOSAntiCheatClientManager()
Fields
PeerToPeerMode
public const bool PeerToPeerMode = true
Field Value
Methods
AddNotifyClientIntegrityViolated(OnClientIntegrityViolatedCallback)
Use to access functionality of EOS_AntiCheatClient_AddNotifyClientIntegrityViolated
public void AddNotifyClientIntegrityViolated(OnClientIntegrityViolatedCallback Callback)
Parameters
Callback
OnClientIntegrityViolatedCallbackCallback to receive notification of client integriy violation (modification of program memory or protected files, etc.
AddNotifyPeerActionRequired(OnPeerActionRequiredCallback)
Use to access functionality of EOS_AntiCheatClient_AddNotifyPeerActionRequired
public void AddNotifyPeerActionRequired(OnPeerActionRequiredCallback Callback)
Parameters
Callback
OnPeerActionRequiredCallbackCallback to receive notification about action required for a peer (usually removal from the session)
AddNotifyPeerAuthStatusChanged(OnPeerAuthStatusChangedCallback)
Use to access functionality of EOS_AntiCheatClient_AddNotifyPeerAuthStatusChanged
public void AddNotifyPeerAuthStatusChanged(OnPeerAuthStatusChangedCallback Callback)
Parameters
Callback
OnPeerAuthStatusChangedCallbackCallback to receive notification when peer auth is complete
AddNotifyToMessageToPeer(OnMessageToPeerCallback)
Use to access functionality of EOS_AntiCheatClient_AddNotifyMessageToPeer
public void AddNotifyToMessageToPeer(OnMessageToPeerCallback Callback)
Parameters
Callback
OnMessageToPeerCallbackCallback to receive message data to send to peer
BeginSession()
Wrapper for calling EOS_AntiCheatClient_BeginSession TODO: Add support for client-server mode
public void BeginSession()
EndSession()
Wrapper for calling EOS_AntiCheatClient_EndSession
public void EndSession()
GetPeerHandle(ProductUserId)
Get index of registered peer by ProductUserId
as IntPtr
public nint GetPeerHandle(ProductUserId UserId)
Parameters
UserId
ProductUserId
Returns
- nint
IntPtr
representation of peer index for use withGetPeerId
orReceiveMessageFromPeer
GetPeerId(nint)
Get ProductUserId
of registered peer by index
public ProductUserId GetPeerId(nint PeerHandle)
Parameters
PeerHandle
nint
Returns
- ProductUserId
ProductUserId
of peer, or null if not registered
IsAntiCheatAvailable()
Check if EAC functionality is availble
public bool IsAntiCheatAvailable()
Returns
- bool
False if EAC client functionality is not available i.e. game was launched without EAC bootstrapper
IsRegisteredPeer(ProductUserId)
Checks if a user with a given ProductUserId
is registered as a peer
public bool IsRegisteredPeer(ProductUserId UserId)
Parameters
UserId
ProductUserIdProductUserId
of peer
Returns
- bool
True if peer is registered
IsSessionActive()
Checks if a protected EAC sessionis active
public bool IsSessionActive()
Returns
- bool
True if session is active
OnAuthLogin(LoginCallbackInfo)
public void OnAuthLogin(Epic.OnlineServices.Auth.LoginCallbackInfo loginCallbackInfo)
Parameters
loginCallbackInfo
LoginCallbackInfo
OnAuthLogout(LogoutCallbackInfo)
public void OnAuthLogout(Epic.OnlineServices.Auth.LogoutCallbackInfo logoutCallbackInfo)
Parameters
logoutCallbackInfo
LogoutCallbackInfo
OnConnectLogin(LoginCallbackInfo)
public void OnConnectLogin(LoginCallbackInfo loginCallbackInfo)
Parameters
loginCallbackInfo
LoginCallbackInfo
ReceiveMessageFromPeer(nint, ArraySegment<byte>)
Wrapper for calling [EOS_AntiCheatClient_ReceiveMessageFromPeer]https://dev.epicgames.com/docs/services/en-US/API/Members/Functions/AntiCheatClient/EOS_AntiCheatClient_ReceiveMessageFromPeer/index.html)
public void ReceiveMessageFromPeer(nint PeerHandle, ArraySegment<byte> Data)
Parameters
PeerHandle
nintIntPtr
referencing another playerData
ArraySegment<byte>ArraySegment<byte>
previously received fromAddNotifyToMessageToPeer
callback
RegisterPeer(ProductUserId)
Wrapper for calling EOS_AntiCheatClient_RegisterPeer TODO: Use ID tokens to verify player platform to determine whether their client must be protected or not (console players would use UnprotectedClient)
public bool RegisterPeer(ProductUserId UserId)
Parameters
UserId
ProductUserIdProductUserId
of peer to register
Returns
- bool
True if peer was successfully registered, or was already registered
RemoveNotifyClientIntegrityViolated(OnClientIntegrityViolatedCallback)
public void RemoveNotifyClientIntegrityViolated(OnClientIntegrityViolatedCallback Callback)
Parameters
Callback
OnClientIntegrityViolatedCallback
RemoveNotifyMessageToPeer(OnMessageToPeerCallback)
public void RemoveNotifyMessageToPeer(OnMessageToPeerCallback Callback)
Parameters
Callback
OnMessageToPeerCallback
RemoveNotifyPeerActionRequired(OnPeerActionRequiredCallback)
public void RemoveNotifyPeerActionRequired(OnPeerActionRequiredCallback Callback)
Parameters
Callback
OnPeerActionRequiredCallback
RemoveNotifyPeerAuthStatusChanged(OnPeerAuthStatusChangedCallback)
public void RemoveNotifyPeerAuthStatusChanged(OnPeerAuthStatusChangedCallback Callback)
Parameters
Callback
OnPeerAuthStatusChangedCallback
UnregisterPeer(ProductUserId)
Wrapper for calling EOS_AntiCheatClient_UnregisterPeer
public bool UnregisterPeer(ProductUserId UserId)
Parameters
UserId
ProductUserIdProductUserId
of peer to unregister
Returns
- bool
True if peer was successfully unregistered, or was already not registered