Robustness pass over MrGameEng.Net:
- WebSocketServer heartbeats each connection (configurable interval/timeout)
and drops peers idle past the timeout — detects half-open TCP that vanished
without a close frame. Tracks last-activity per connection.
- Reassembled messages capped (server and client) so a peer cannot exhaust
memory with an oversized fragmented message.
- Replication snapshots carry a protocol-version byte; a client receiving a
mismatched version drops the message instead of decoding garbage, and a
truncated snapshot is ignored without throwing.
- ReplicationClient.Clear() deletes all replicated entities, so clients can
wipe stale state before reconnecting.
Tests: heartbeat healthy-survives / silent-peer-dropped, protocol-version
mismatch, truncated snapshot, replication clear.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>