group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Server::Connection::PendingReliableEvent Struct Reference

Phase 3d-5: pending reliable events, each scheduled for remainingSends more cycles. More...

#include <Server.hpp>

Public Attributes

uint16_t sequence
 Per-channel send sequence.
uint8_t remainingSends
 Decremented each send; popped at 0.
std::shared_ptr< const std::vector< uint8_t > > framed
 [PacketType][rest] payload bytes (shared).

Detailed Description

Phase 3d-5: pending reliable events, each scheduled for remainingSends more cycles.

Server drains in network loop; entries with remainingSends == 0 are popped.

PR-5a (server-perf): framed is now shared_ptr<const ...> so a single broadcast (kill, particle, match-state) shares one byte buffer across N clients. Pre-PR-5a each client got a fresh std::vector<uint8_t> copy — at 300 clients × 12.5 % fire-burst ticks that was the visible broadcastEvents p99 spike at 25–50 ms.

Member Data Documentation

◆ framed

std::shared_ptr<const std::vector<uint8_t> > Server::Connection::PendingReliableEvent::framed

[PacketType][rest] payload bytes (shared).

◆ remainingSends

uint8_t Server::Connection::PendingReliableEvent::remainingSends

Decremented each send; popped at 0.

◆ sequence

uint16_t Server::Connection::PendingReliableEvent::sequence

Per-channel send sequence.


The documentation for this struct was generated from the following file: