TrinityCore
Loading...
Searching...
No Matches
PacketLog Class Reference

#include <PacketLog.h>

Public Member Functions

void Initialize ()
 
bool CanLogPacket () const
 
void LogPacket (WorldPacket const &packet, Direction direction, boost::asio::ip::address const &addr, uint16 port)
 

Static Public Member Functions

static PacketLog * instance ()
 

Private Member Functions

 PacketLog ()
 
 ~PacketLog ()
 

Private Attributes

std::mutex _logPacketLock
 
std::once_flag _initializeFlag
 
FILE * _file
 

Detailed Description

Definition at line 34 of file PacketLog.h.

Constructor & Destructor Documentation

◆ PacketLog()

PacketLog::PacketLog ( )
private

Definition at line 60 of file PacketLog.cpp.

References _initializeFlag, and Initialize().

◆ ~PacketLog()

PacketLog::~PacketLog ( )
private

Definition at line 65 of file PacketLog.cpp.

References _file.

Member Function Documentation

◆ CanLogPacket()

bool PacketLog::CanLogPacket ( ) const
inline

Definition at line 46 of file PacketLog.h.

Referenced by Initialize().

◆ Initialize()

◆ instance()

PacketLog * PacketLog::instance ( )
static

Definition at line 73 of file PacketLog.cpp.

References instance().

Referenced by instance().

◆ LogPacket()

Member Data Documentation

◆ _file

FILE* PacketLog::_file
private

Definition at line 50 of file PacketLog.h.

Referenced by Initialize(), LogPacket(), and ~PacketLog().

◆ _initializeFlag

std::once_flag PacketLog::_initializeFlag
private

Definition at line 40 of file PacketLog.h.

Referenced by PacketLog().

◆ _logPacketLock

std::mutex PacketLog::_logPacketLock
private

Definition at line 39 of file PacketLog.h.

Referenced by LogPacket().


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