ServerClientChannel struct
Authority-side state for one connected Owner. The unit of per-client replication.
Owns the inbound PlayerInputLog, per-entity Replicated[] bitvector, NetChannel typed send wrapper, and outbound PendingPacketQueue. Lives inside the World's ReplicationSystem — PIE worlds are isolated naturally.
Public functions
- void Open(uint8_t ownerID, uint32_t logDepth, ConnectionInfo* ci, NetConnectionManager* mgr, uint32_t entityCapacity = 0)
- Open the channel — allocates the input log and sets
OwnerID. - void Close()
- Close the channel and release all resources.
- auto IsReplicated(uint32_t index) const -> bool
- void MarkReplicated(uint32_t index)
- Mark slab index
indexas replicated (EntitySpawn sent). - void ClearReplicated(uint32_t index)
- Clear the replicated flag for
index(entity destroyed). - void EnsureCapacity(uint32_t count)
- Grow the
Replicatedvector to cover at leastcountslots.
Public variables
- PlayerInputLog InputLog
- Inbound input frames from this Owner.
- std::vector<bool> Replicated
- Per-slab-index spawn tracking; true = EntitySpawn sent.
- std::vector<uint32_t> PendingActivations
- Net handle values queued for EntityActivate; drained once Playing.
- NetChannel Channel
- Typed per-connection send wrapper.
- PendingPacketQueue SendQueue
- Worker-push / Sentinel-drain MPSC queue.
- std::optional<PendingPacket> PendingPlayerConfirm
- Held until spawns are in SendQueue; pushed in Flush().
- uint32_t PendingPlayerConfirmSpawnFrame
- Minimum LastDispatchedFrame before confirm may be pushed.
- ConnectionInfo* CI
- GNS connection state (non-owning).
- uint8_t OwnerID
- Stable session identity (1–255; 0 = server).
- uint32_t LastAckedSimFrame
- Last simulation frame this client confirmed receiving.
Function documentation
bool ServerClientChannel:: IsReplicated(uint32_t index) const
| Returns | true if a EntitySpawn has been sent for index. |
|---|