Skip to content

Custom Networking

  • IAnomalyMessage contract — MessageName, TransportChannel, Serialize, Deserialize.
  • Registration — AnomalyMessageRegistry.Register on 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.AnomalyMessageReceived or 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.CurrentVersion in the handshake.
  • Authoring tips — keep payloads small, use TransportChannel to pick reliable/unreliable, never re-use a message name.
  • 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.