Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
PacketCounter Class Reference

#include <client.h>

+ Collaboration diagram for PacketCounter:

Public Member Functions

 PacketCounter ()=default
 
void add (u16 command)
 
void clear ()
 
u32 sum () const
 
void print (std::ostream &o) const
 

Private Attributes

std::map< u16, u32 > m_packets
 

Constructor & Destructor Documentation

◆ PacketCounter()

PacketCounter::PacketCounter ( )
default

Member Function Documentation

◆ add()

void PacketCounter::add ( u16 command)
inline

References m_packets.

Referenced by Client::ProcessData().

+ Here is the caller graph for this function:

◆ clear()

void PacketCounter::clear ( )
inline

References m_packets.

Referenced by Client::step().

+ Here is the caller graph for this function:

◆ print()

void PacketCounter::print ( std::ostream & o) const

References m_packets, ToClientCommandHandler::name, TOCLIENT_NUM_MSG_TYPES, and toClientCommandTable.

Referenced by Client::step().

+ Here is the caller graph for this function:

◆ sum()

u32 PacketCounter::sum ( ) const

References m_packets.

Referenced by Client::step().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_packets

std::map<u16, u32> PacketCounter::m_packets
private

Referenced by add(), clear(), print(), and sum().


The documentation for this class was generated from the following files: