#include <PacketAudit.h>
类 | |
| struct | FScopedAuditAccess |
| Provides scoped exclusive access to GSendPacketAudits and GReceivePacketAudits within the .cpp file 更多... | |
静态 Public 成员函数 | |
| static FORCEINLINE void | AddStage (FString StageName, FBitWriter &OutPacket, bool bByteAligned=false) |
| On the send side, marks a named stage during packet writing, which should be audited on the receive side. 更多... | |
| static FORCEINLINE void | CheckStage (FString StageName, FBitReader &InPacket, bool bByteAligned=false) |
| On the receive side, checks to see that a named stage was marked for auditing on the send side, and audits the packet data. 更多... | |
| static void | Destruct () |
| Destroy GPacketAuditor | |
| static void | Init () |
| Initialize GPacketAudtor | |
| static FORCEINLINE void | NotifyLowLevelReceive (FBitReader &InPacket) |
| Low level netcode hook, notifying of incoming packets 更多... | |
| static FORCEINLINE void | NotifyLowLevelSend (FBitWriter &OutPacket) |
| Low level netcode hook, notifying of outgoing packets 更多... | |
Protected 成员函数 | |
| void | DumpAuditData (FScopedAuditAccess &AuditLock, uint32 InPacketCRC=0) |
| Dumps the collected packet audit data to the log | |
静态 Protected 成员函数 | |
| static uint32 | PacketCRC (uint8 *Data, uint32 DataLenBits) |
| Gets the CRC of a packet, zeroing any unwritten bits in the last byte beforehand. 更多... | |
Protected 属性 | |
| FPlatformProcess::FSemaphore * | GameMutex |
| Mutex used for enforcing a single instance of client/server packet auditing | |
| FPlatformMemory::FSharedMemoryRegion * | ReceiveSharedMemory |
| Shared memory region for packet receives | |
| FPlatformMemory::FSharedMemoryRegion * | SendSharedMemory |
| Shared memory region for packet sends | |
| FPlatformProcess::FSemaphore * | SharedMutex |
| Mutex used for exclusive access to shared memory | |
Uses inter-process-communication, to audit every stage of packet processing, for verifying that packets are processing properly, and that the client/server are in sync at every stage of reading/writing.
Since this relies on IPC, it is only suitable for testing on a single machine.
IMPORTANT: Only supports interaction between a single server, and a single client.
|
inlinestatic |
On the send side, marks a named stage during packet writing, which should be audited on the receive side.
| StageName | The unique name to provide this stage of packet writing |
| OutPacket | The packet the data is being written to - used for gathering audit information |
| bByteAligned | Whether or not to treat the packet as if it is byte aligned (used in rare circumstances) |
|
inlinestatic |
On the receive side, checks to see that a named stage was marked for auditing on the send side, and audits the packet data.
| StageName | The unique name to this stage of packet processing |
| InPacket | The packet the data is being read from - used for gathering audit information |
| bByteAligned | Whether or not to treat the packet as if it is byte aligned (used in rare circumstances) |
|
inlinestatic |
Low level netcode hook, notifying of incoming packets
| InPacket | The current incoming packet |
|
inlinestatic |
Low level netcode hook, notifying of outgoing packets
| OutPacket | The current outgoing packet |
|
staticprotected |
Gets the CRC of a packet, zeroing any unwritten bits in the last byte beforehand.
| Data | The packet data |
| DataLenBits | The length of the data, in bits |