Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
traffic.hpp File Reference

Datagrams and bytes exchanged with a peer, by direction and packet type. More...

#include <aegis2d/net/export.hpp>
#include <aegis2d/net/packet.hpp>
#include <array>
#include <chrono>
#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Classes

struct  aegis2d::net::TrafficCount
 A number of datagrams and the bytes they hold. More...
 
class  aegis2d::net::TrafficCounters
 Counts the datagrams exchanged with one peer, by direction and packet type. More...
 

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::net
 Binary serialization, UDP/TCP sockets and the network thread.
 

Enumerations

enum class  aegis2d::net::Direction : std::uint8_t { aegis2d::net::Sent = 0 , aegis2d::net::Received = 1 }
 Way a datagram went. More...
 

Detailed Description

Datagrams and bytes exchanged with a peer, by direction and packet type.

Measures the traffic of a session, to compare the network optimizations with real numbers: the totals since the start, and the last whole second.