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
CallbackOnClientIntegrityViolatedCallbackCallback 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
CallbackOnPeerActionRequiredCallbackCallback 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
CallbackOnPeerAuthStatusChangedCallbackCallback to receive notification when peer auth is complete
AddNotifyToMessageToPeer(OnMessageToPeerCallback)
Use to access functionality of EOS_AntiCheatClient_AddNotifyMessageToPeer
public void AddNotifyToMessageToPeer(OnMessageToPeerCallback Callback)
Parameters
CallbackOnMessageToPeerCallbackCallback 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
UserIdProductUserId
Returns
- nint
IntPtrrepresentation of peer index for use withGetPeerIdorReceiveMessageFromPeer
GetPeerId(nint)
Get ProductUserId of registered peer by index
public ProductUserId GetPeerId(nint PeerHandle)
Parameters
PeerHandlenint
Returns
- ProductUserId
ProductUserIdof 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
UserIdProductUserIdProductUserIdof 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
loginCallbackInfoLoginCallbackInfo
OnAuthLogout(LogoutCallbackInfo)
public void OnAuthLogout(Epic.OnlineServices.Auth.LogoutCallbackInfo logoutCallbackInfo)
Parameters
logoutCallbackInfoLogoutCallbackInfo
OnConnectLogin(LoginCallbackInfo)
public void OnConnectLogin(LoginCallbackInfo loginCallbackInfo)
Parameters
loginCallbackInfoLoginCallbackInfo
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
PeerHandlenintIntPtrreferencing another playerDataArraySegment<byte>ArraySegment<byte>previously received fromAddNotifyToMessageToPeercallback
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
UserIdProductUserIdProductUserIdof peer to register
Returns
- bool
True if peer was successfully registered, or was already registered
RemoveNotifyClientIntegrityViolated(OnClientIntegrityViolatedCallback)
public void RemoveNotifyClientIntegrityViolated(OnClientIntegrityViolatedCallback Callback)
Parameters
CallbackOnClientIntegrityViolatedCallback
RemoveNotifyMessageToPeer(OnMessageToPeerCallback)
public void RemoveNotifyMessageToPeer(OnMessageToPeerCallback Callback)
Parameters
CallbackOnMessageToPeerCallback
RemoveNotifyPeerActionRequired(OnPeerActionRequiredCallback)
public void RemoveNotifyPeerActionRequired(OnPeerActionRequiredCallback Callback)
Parameters
CallbackOnPeerActionRequiredCallback
RemoveNotifyPeerAuthStatusChanged(OnPeerAuthStatusChangedCallback)
public void RemoveNotifyPeerAuthStatusChanged(OnPeerAuthStatusChangedCallback Callback)
Parameters
CallbackOnPeerAuthStatusChangedCallback
UnregisterPeer(ProductUserId)
Wrapper for calling EOS_AntiCheatClient_UnregisterPeer
public bool UnregisterPeer(ProductUserId UserId)
Parameters
UserIdProductUserIdProductUserIdof peer to unregister
Returns
- bool
True if peer was successfully unregistered, or was already not registered