Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
PacketLog.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
#ifndef SKYFIRE_PACKETLOG_H
6
#define SKYFIRE_PACKETLOG_H
7
8
#include "
Common.h
"
9
#include "
PacketLogServer.h
"
10
#include "
Platform/Singleton.h
"
11
#include <string>
12
13
enum
Direction
14
{
15
CLIENT_TO_SERVER
,
16
SERVER_TO_CLIENT
17
};
18
19
class
WorldPacket
;
20
21
typedef
Skyfire::PacketLogServerSessionInfo
PacketLogSessionInfo
;
22
23
class
PacketLog
24
{
25
friend
class
Skyfire::Singleton
<
PacketLog
,
Skyfire
::Mutex>;
26
27
private
:
28
PacketLog
();
29
~
PacketLog
();
30
31
public
:
32
void
Initialize
();
33
bool
CanLogPacket
() const;
34
void
EnableGlobalLogging
();
35
void
DisableAllLogging
();
36
void
EnableCharacterLogging
(std::string const& characterName);
37
void
DisableCharacterLogging
(std::string const& characterName);
38
bool
IsGlobalLoggingEnabled
() const;
39
size_t
GetCharacterLoggingCount
() const;
40
void
LogPacket
(WorldPacket const& packet, Direction direction);
41
void
LogPacket
(void const* sessionKey, PacketLogSessionInfo const& sessionInfo, WorldPacket const& packet, Direction direction);
42
void
LogMarker
(void const* sessionKey, PacketLogSessionInfo const& sessionInfo, std::string const& marker);
43
void
RefreshSessionInfo
(void const* sessionKey, PacketLogSessionInfo const& sessionInfo);
44
void
CloseSession
(void const* sessionKey);
45
};
46
47
#define sPacketLog Skyfire::Singleton<PacketLog, Skyfire::Mutex>::instance()
48
#endif
Common.h
PacketLogSessionInfo
Skyfire::PacketLogServerSessionInfo PacketLogSessionInfo
Definition
PacketLog.h:21
Direction
Direction
Definition
PacketLog.h:14
SERVER_TO_CLIENT
@ SERVER_TO_CLIENT
Definition
PacketLog.h:16
CLIENT_TO_SERVER
@ CLIENT_TO_SERVER
Definition
PacketLog.h:15
PacketLogServer.h
Singleton.h
PacketLog::LogPacket
void LogPacket(WorldPacket const &packet, Direction direction)
Definition
PacketLog.cpp:37
PacketLog::DisableCharacterLogging
void DisableCharacterLogging(std::string const &characterName)
Definition
PacketLog.cpp:59
PacketLog::RefreshSessionInfo
void RefreshSessionInfo(void const *sessionKey, PacketLogSessionInfo const &sessionInfo)
Definition
PacketLog.cpp:89
PacketLog::CanLogPacket
bool CanLogPacket() const
Definition
PacketLog.cpp:32
PacketLog::CloseSession
void CloseSession(void const *sessionKey)
Definition
PacketLog.cpp:94
PacketLog::GetCharacterLoggingCount
size_t GetCharacterLoggingCount() const
Definition
PacketLog.cpp:69
PacketLog::EnableGlobalLogging
void EnableGlobalLogging()
Definition
PacketLog.cpp:44
PacketLog::EnableCharacterLogging
void EnableCharacterLogging(std::string const &characterName)
Definition
PacketLog.cpp:54
PacketLog::PacketLog
PacketLog()
Definition
PacketLog.cpp:18
PacketLog::IsGlobalLoggingEnabled
bool IsGlobalLoggingEnabled() const
Definition
PacketLog.cpp:64
PacketLog::LogMarker
void LogMarker(void const *sessionKey, PacketLogSessionInfo const &sessionInfo, std::string const &marker)
Definition
PacketLog.cpp:84
PacketLog::DisableAllLogging
void DisableAllLogging()
Definition
PacketLog.cpp:49
PacketLog::Initialize
void Initialize()
Definition
PacketLog.cpp:27
Skyfire::Singleton
Definition
Singleton.h:15
WorldPacket
Definition
WorldPacket.h:16
Skyfire
Definition
AuthPatchTransfer.h:12
Skyfire::PacketLogServerSessionInfo
Definition
PacketLogServer.h:28
src
server
game
Server
Protocol
PacketLog.h
Generated on
for Project SkyFire Core by
1.17.0