Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::net::TrafficCount Struct Reference

A number of datagrams and the bytes they hold. More...

#include <aegis2d/net/traffic.hpp>

Public Member Functions

TrafficCount & operator+= (const TrafficCount &other) noexcept
 Adds another count.
 
bool operator== (const TrafficCount &) const =default
 Field-by-field equality.
 

Public Attributes

std::uint64_t datagrams = 0
 Datagrams.
 
std::uint64_t bytes = 0
 Bytes of the datagrams, the 18-byte header included; the IP and UDP headers (28 bytes in IPv4, 48 in IPv6) are not counted.
 

Detailed Description

A number of datagrams and the bytes they hold.

Member Function Documentation

◆ operator+=()

TrafficCount & aegis2d::net::TrafficCount::operator+= ( const TrafficCount &  other)
inlinenoexcept

Adds another count.

Parameters
otherCount to add.
Returns
This count.

◆ operator==()

bool aegis2d::net::TrafficCount::operator== ( const TrafficCount &  ) const
default

Field-by-field equality.

Returns
true if both fields are equal.

Member Data Documentation

◆ bytes

std::uint64_t aegis2d::net::TrafficCount::bytes = 0

Bytes of the datagrams, the 18-byte header included; the IP and UDP headers (28 bytes in IPv4, 48 in IPv6) are not counted.

◆ datagrams

std::uint64_t aegis2d::net::TrafficCount::datagrams = 0

Datagrams.


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