EntropyEngine::Networking::SchemaNackTracker
EntropyEngine::Networking::SchemaNackTracker
Section titled “EntropyEngine::Networking::SchemaNackTracker”Tracks schema NACKs with rate limiting and metrics. More…
#include <SchemaNackTracker.h>
Public Classes
Section titled “Public Classes”| Name | |
|---|---|
| struct | Config Configuration for NACK rate limiting. |
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| bool | shouldSendNack(const ComponentTypeHash & typeHash) Check if a NACK should be sent for a schema. |
| void | recordNackSent(const ComponentTypeHash & typeHash) Record that a NACK was sent. |
| size_t | getUniqueSchemas() const Get number of unique schemas NACKed. |
| size_t | getTotalNacksSent() const Get total number of NACKs sent. |
| void | clear() Clear all tracked state. |
| SchemaNackTracker(const Config & config =Config()) |
Detailed Description
Section titled “Detailed Description”class EntropyEngine::Networking::SchemaNackTracker;Tracks schema NACKs with rate limiting and metrics.
Simple tracker to prevent NACK spam when encountering unknown schemas. Uses basic time-based rate limiting per schema hash.
Public Functions Documentation
Section titled “Public Functions Documentation”function shouldSendNack
Section titled “function shouldSendNack”bool shouldSendNack( const ComponentTypeHash & typeHash)Check if a NACK should be sent for a schema.
Parameters:
- typeHash The ComponentTypeHash that is unknown
Return: true if NACK should be sent, false if rate limited
Applies rate limiting - returns true if enough time has passed since last NACK.
function recordNackSent
Section titled “function recordNackSent”void recordNackSent( const ComponentTypeHash & typeHash)Record that a NACK was sent.
Parameters:
- typeHash The ComponentTypeHash that was NACKed
Updates the last NACK timestamp for the schema.
function getUniqueSchemas
Section titled “function getUniqueSchemas”size_t getUniqueSchemas() constGet number of unique schemas NACKed.
function getTotalNacksSent
Section titled “function getTotalNacksSent”size_t getTotalNacksSent() constGet total number of NACKs sent.
function clear
Section titled “function clear”void clear()Clear all tracked state.
function SchemaNackTracker
Section titled “function SchemaNackTracker”explicit SchemaNackTracker( const Config & config =Config())Updated on 2026-01-26 at 16:50:32 -0500