Custom Networking
Intended scope
Section titled “Intended scope”IAnomalyMessagecontract —MessageName,TransportChannel,Serialize,Deserialize.- Registration —
AnomalyMessageRegistry.Registeron both sides; FNV-1a name hashing; startup collision detection. - Channel
0xFE— reserved for Anomaly; how Anomaly tunnels payloads under Mirror’s channel abstraction. - Sending —
AnomalyMessaging.Send(client → server) and the server-side equivalent. - Receiving —
NetworkMessageEvents.AnomalyMessageReceivedor direct deserialize in a handler. - Replay-protection contract — the per-(hub × Mirror-channel) monotonic counter and 128-bit sliding window. Mixed-version clients and servers reject each other via
AnomalyProtocol.CurrentVersionin the handshake. - Authoring tips — keep payloads small, use
TransportChannelto pick reliable/unreliable, never re-use a message name.
Sources
Section titled “Sources”E:\Projects\AnomalyLabs\Anomaly\Anomaly.Client.Api\Networking\NETWORKING.md— authoring guide.Anomaly.Shared\Networking\IAnomalyMessage.cs,AnomalyMessageRegistry.cs,AnomalyChannel.cs,AnomalyProtocol.cs.- Reference → Protocol — wire-format detail.