FAntiCheatGate
The server-side half of the anti-cheat seam, kept apart from the socket so a test drives it without one. It owns the per-peer trust state, routes the tagged integrity frames to the active service, rate-limits what a client may send, and decides whether a peer is admitted: with RequireTrustedClients on, a peer stays outside the session until the service reports it trusted, and is dropped when it turns untrusted or the grace window runs out.
- Module
- Networking
- Header
#include "Networking/AntiCheat/AntiCheatGate.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
std::function<void(uint32_t, EAntiCheatClientStatus)> | OnClientStatusChanged | Observers for scripts and the host; both fire on the game thread. |
std::function<void(uint32_t, EAntiCheatKickReason, const std::string&)> | OnKick |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Configure | The service may be null (no anti-cheat registered): the gate is then a pass-through that admits every peer. |
void | Reset | |
bool | IsGateActive | True when a service is wired and the settings demand a trusted client. |
void | PeerConnected | deferRegistration holds RegisterClient back until PeerAuthenticated, for a server whose identity (the ticket's user id) is known only after the handshake. |
void | PeerAuthenticated | |
void | PeerDisconnected | |
bool | HandleFrame | True when the frame carried the anti-cheat tag, whether or not it was accepted: the caller must not treat it as game traffic. |
void | Update | |
bool | IsPeerAdmitted | |
EAntiCheatClientStatus | GetPeerStatus | |
bool | KickPeer | |
const FAntiCheatSettings& | GetSettings | |
FAntiCheatGate* | Active | The gate the running server owns, so Visual Scripting can reach it without the Networking module knowing the server host. |
void | SetActive |
Function details
Configure
void Configure(IAntiCheatService* service, const FAntiCheatSettings& settings, const FHooks& hooks)The service may be null (no anti-cheat registered): the gate is then a pass-through that admits every peer.
Reset
void Reset()IsGateActive
bool IsGateActive() constTrue when a service is wired and the settings demand a trusted client.
PeerConnected
void PeerConnected(uint32_t peerId, const std::string& address, bool deferRegistration)deferRegistration holds RegisterClient back until PeerAuthenticated, for a server whose identity (the ticket's user id) is known only after the handshake.
PeerAuthenticated
void PeerAuthenticated(uint32_t peerId, uint64_t userId)PeerDisconnected
void PeerDisconnected(uint32_t peerId)HandleFrame
bool HandleFrame(uint32_t peerId, const uint8_t* data, size_t size)True when the frame carried the anti-cheat tag, whether or not it was accepted: the caller must not treat it as game traffic.
Update
void Update(float deltaSeconds)IsPeerAdmitted
bool IsPeerAdmitted(uint32_t peerId) constGetPeerStatus
EAntiCheatClientStatus GetPeerStatus(uint32_t peerId) constKickPeer
bool KickPeer(uint32_t peerId, EAntiCheatKickReason reason, const std::string& detail)GetSettings
const FAntiCheatSettings& GetSettings() constActive
static FAntiCheatGate* Active()The gate the running server owns, so Visual Scripting can reach it without the Networking module knowing the server host. Null off-server.
SetActive
static void SetActive(FAntiCheatGate* gate)