v0.10.0
MafiaNet v0.10.0
Core / API
- Umbrella header
mafianet/mafianet.h— single include aggregating the core public headers (RakPeerInterface, types, message IDs,PacketPriority,BitStream,GetTime,Statistics). Additive; encryption headers intentionally omitted (security stays opt-in). - Canonical type aliases (
mafianet/aliases.h) —PeerInterface,Guid,Statistics,UnassignedGuidover the legacy RakNet names.usingaliases, fully interoperable; legacy names untouched. - RAII handles
Peer&PacketPtr(mafianet/PeerHandle.h) — own aRakPeerInterface/ receivedPacketand clean up on scope exit. ChatExample client rewritten to use them. - Thread-safe GUID value accessors (
mafianet/guid_util.h) —MafiaNet::to_string(const RakNetGUID&)(owns its buffer) andconnected_address(...)returningstd::optional<SystemAddress>.
Spatial
PointGridSectorizer— uniform point grid with O(1)RemoveEntry/MoveEntry(per-entry hash + swap-remove, early-out on same-cell moves), upsert add/move, duplicate-freeGetEntries, edge-cell clamping.GridSectorizerleft untouched.
⚠️ Breaking changes
- Scoped enum classes — global
PacketPriority/PacketReliabilityC enums removed in favour of scopedMafiaNet::Priority/MafiaNet::Reliability. Enumerator order and wire field preserved; update call sites (HIGH_PRIORITY→MafiaNet::Priority::High,RELIABLE_ORDERED→MafiaNet::Reliability::ReliableOrdered).NUMBER_OF_*sentinels are nowconstexprcounts inMafiaNet. - Removed non-thread-safe
RakNetGUID::ToString(void)(shared static buffer) — useMafiaNet::to_string(g).c_str().
Bug fix
PeerHandleno longer dereferences a moved-fromPeerinreceive(); corrected header copyright.
Testing
- Added
PointGridSectorizerTest,PeerHandleTest,GuidUtilTest; hardenedDisconnectReasonTestagainst CI scheduler starvation.
Full changelog: v0.9.0...v0.10.0