Core/PacketLog: Save session ip and port information in saved packets
This data is put into the "optional data" part of each packet of the PKT 3.1 format It will be used with WPP to debug some networking issues
This commit is contained in:
1 parent
2b6ee6674a
commit
43f868e55c
3 files changed
+29
-6
No files matched your search
@@ -92,7 +92,7 @@ void WorldSocket::ReadDataHandler(boost::system::error_code error, size_t transf
|
||||
}
|
||||
|
||||
if (sPacketLog->CanLogPacket())
|
||||
sPacketLog->LogPacket(packet, CLIENT_TO_SERVER);
|
||||
sPacketLog->LogPacket(packet, CLIENT_TO_SERVER, GetRemoteIpAddress(), GetRemotePort());
|
||||
|
||||
TC_LOG_TRACE("network.opcode", "C->S: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), GetOpcodeNameForLogging(opcode).c_str());
|
||||
|
||||
@@ -142,7 +142,7 @@ void WorldSocket::ReadDataHandler(boost::system::error_code error, size_t transf
|
||||
void WorldSocket::AsyncWrite(WorldPacket& packet)
|
||||
{
|
||||
if (sPacketLog->CanLogPacket())
|
||||
sPacketLog->LogPacket(packet, SERVER_TO_CLIENT);
|
||||
sPacketLog->LogPacket(packet, SERVER_TO_CLIENT, GetRemoteIpAddress(), GetRemotePort());
|
||||
|
||||
TC_LOG_TRACE("network.opcode", "S->C: %s %s", (_worldSession ? _worldSession->GetPlayerInfo() : GetRemoteIpAddress().to_string()).c_str(), GetOpcodeNameForLogging(packet.GetOpcode()).c_str());
|
||||
|
||||
|
||||
Reference in new issue
Block a user