Peer struct
#include <Jazz2/Multiplayer/Peer.h>
Remote peer as opaque handle.
Lightweight value type identifying a single network connection. It wraps the underlying ENet peer or WebSocket handle (depending on platform and transport) behind comparison, validity and stable-ID accessors, so the rest of the engine can refer to connections without touching transport details.
Constructors, destructors, conversion operators
-
Peer(std::
nullptr_t = nullptr) - Creates a new instance.
- operator bool() const explicit
Public functions
- auto operator==(const Peer& other) const -> bool
- auto operator!=(const Peer& other) const -> bool
- auto IsValid() const -> bool
- Returns
trueif the peer is valid. -
auto GetId() const -> std::
uint64_t - Returns a unique numeric identifier for logging and serialization.