Skip to content

v0.11.0

Choose a tag to compare

@Segfaultd Segfaultd released this 14 Jul 08:56
· 6 commits to master since this release

Core / API

  • Range-based receive Peer::incoming() — drain the receive queue with a range-for; each iteration yields a fresh PacketPtr freed at end of scope, and pkt.id() returns the ID_TIMESTAMP-aware message identifier.
  • Startup builders Peer::server() / Peer::client() — a fluent chain folding SocketDescriptor + Startup + result check + SetMaximumIncomingConnections / Connect into one call. start() returns a move-only Result<Peer> whose error preserves the underlying StartupResult / ConnectionAttemptResult (tagged by PeerStage). Security stays opt-in (secure() / public_key()).
  • Serialization archives (mafianet/Archive.h) — one serialize(Ar&) member template describes a type's wire format for both directions; WriteArchive / ReadArchive adapt a BitStream, recursing into nested serialize() types and falling through to operator<< / operator>> for everything else.
  • Typed message dispatcher (mafianet/Dispatcher.h) — on<T>(handler) auto-assigns identifiers from ID_USER_PACKET_ENUM in registration order (documented wire contract; on<T>(id, handler) pins explicit ids), on(id, handler) covers system messages, and dispatch() skips ID_TIMESTAMP prefixes and hands handlers a deserialized T plus a Sender. encode() is the symmetric write path. Opt-in — the raw switch stays fully usable.
  • Typed Peer::send / Peer::broadcast — serialize-and-send a registered message in one call via the dispatcher registry, with overridable defaults (Priority::High, Reliability::ReliableOrdered, channel 0). Destination accepts SystemAddress or RakNetGUID; raw Send() untouched.

Build

  • RakVoice is built into the core library — header now mafianet/RakVoice.h; Opus and RNNoise are fetched and linked into the core automatically, no separate extension build.

Testing / CI

  • Full GoogleTest migration — all 29 legacy tests ported and the Samples/Tests TestInterface harness deleted. Hermetic UnitTests and loopback IntegrationTests under Tests/, one process per test via CTest; MAFIANET_BUILD_TESTS builds everything test-related (requires MAFIANET_BUILD_STATIC). CI runs ctest with JUnit artifacts on all platforms.

Full changelog: v0.10.0...v0.11.0