Navigation
API > API/Runtime > API/Runtime/PacketHandler
This class appends or modifies incoming and outgoing packets on a connection
| Name | HandlerComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/PacketHandlers/PacketHandler/Public/PacketHandler.h |
| Include Path | #include "PacketHandler.h" |
Syntax
class HandlerComponent
Derived Classes
- FEncryptionComponent
- OodleNetworkHandlerComponent
- StatelessConnectHandlerComponent
- ReliabilityHandlerComponent
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
HandlerComponent
(
FName InName |
Constructor that accepts a name | PacketHandler.h | |
| Base constructorHandlerComponent | PacketHandler.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~HandlerComponent() |
Base destructor | PacketHandler.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Handler | PacketHandler * | The manager of the handler, set in initialization | PacketHandler.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bActive | bool | Whether this handler is active, which dictates whether it will receive incoming and outgoing packets. | PacketHandler.h | |
| bInitialized | bool | Whether this handler is fully initialized on both remote and local | PacketHandler.h | |
| Name | FName | The name of this component | PacketHandler.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanReadUnaligned() |
Whether or not the Incoming/IncomingConnectionless implementations, support reading Packets that aren't aligned at bit position 0 (i.e. whether or not this handler supports bit-level, rather than byte-level, reads) | PacketHandler.h | |
virtual void CountBytes
(
FArchive& Ar |
PacketHandler.h | ||
FName GetName() |
Returns the name of this component. | PacketHandler.h | |
int32 GetReservedPacketBits () |
Returns the amount of reserved packet/protocol bits expected from this component. | PacketHandler.h | |
virtual void Incoming
(
FBitReader& Packet |
Delay deprecation for initial checkin | PacketHandler.h | |
virtual void Incoming
(
FIncomingPacketRef PacketRef |
Handles incoming packets | PacketHandler.h | |
virtual void IncomingConnectionless
(
FIncomingPacketRef PacketRef |
Handles incoming packets not associated with a UNetConnection | PacketHandler.h | |
virtual void InitFaultRecovery
(
UE::Net::FNetConnectionFaultRecoveryBase* InFaultRecovery |
Initializes a reference to the NetConnection fault recovery interface (does not require Engine dependency) | PacketHandler.h | |
void Initialize() |
Initialization functionality should be placed here | PacketHandler.h | |
virtual bool IsActive() |
Returns whether this handler is currently active | PacketHandler.h | |
bool IsInitialized() |
Returns whether this handler is initialized | PacketHandler.h | |
bool IsValid() |
Return whether this handler is valid | PacketHandler.h | |
virtual void NotifyAnalyticsProvider() |
Notification that the analytics provider has been updated NOTE: Can also mean disabled, e.g. during hotfix | PacketHandler.h | |
virtual void NotifyHandshakeBegin() |
Notification to this component that it is ready to begin handshaking | PacketHandler.h | |
virtual void Outgoing
(
FBitWriter& Packet, |
Handles any outgoing packets | PacketHandler.h | |
virtual void OutgoingConnectionless
(
const TSharedPtr< const FInternetAddr >& Address, |
Handles any outgoing packets not associated with a UNetConnection | PacketHandler.h | |
bool RequiresHandshake() |
Returns whether this handler perform a network handshake during initialization | PacketHandler.h | |
bool RequiresReliability() |
Returns whether this handler perform a network handshake during initialization | PacketHandler.h | |
virtual void SetActive
(
bool Active |
Sets whether this handler is currently active | PacketHandler.h | |
virtual void Tick
(
float DeltaTime |
Tick functionality should be placed here | PacketHandler.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Initialized() |
Should be called when the handler is fully initialized on both remote and local | PacketHandler.h | |
void SetState
(
UE::Handler::Component::State State |
Sets the state of the handler | PacketHandler.h |