HandlerComponent

This class appends or modifies incoming and outgoing packets on a connection

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

PacketHandler

Header

/Engine/Source/Runtime/PacketHandlers/PacketHandler/Public/PacketHandler.h

Include

#include "PacketHandler.h"

Syntax

class HandlerComponent

Remarks

This class appends or modifies incoming and outgoing packets on a connection

Variables

Name Description

Protected variable

bool

 

bRequiresHandshake

Whether this handler has to perform a network handshake during initialization (requires waiting on other HandlerComponent's)

Protected variable

bool

 

bRequiresReliability

Whether this handler depends upon the ReliabilityHandlerComponent being enabled

Public variable

PacketHandler &...

 

Handler

The manager of the handler, set in initialization

Protected variable

uint32

 

MaxOutgoingBits

Maximum number of Outgoing packet bits supported (automatically calculated to factor in other HandlerComponent reserved bits)

Protected variable

Handler::Compon...

 

State

The state of this handler

Constructors

Name Description

Public function

HandlerComponent()

Base constructor

HandlerComponent

Public function

HandlerComponent

(
    FName InName
)

Constructor that accepts a name

Destructors

Name Description

Public function Virtual

~HandlerComponent()

Base destructor

Functions

Name Description

Public function Virtual Const

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)

Public function Virtual Const

void

 

CountBytes

(
    FArchive& Ar
)

Public function Const

FName

 

GetName()

Returns the name of this component.

Public function Const

int32

 

GetReservedPacketBits()

Returns the amount of reserved packet/protocol bits expected from this component.

Public function Virtual

void

 

Incoming

(
    FBitReader& Packet
)

Handles incoming packets

Public function Virtual

void

 

IncomingConnectionless

(
    FIncomingPacketRef PacketRef
)

Handles incoming packets not associated with a UNetConnection

Public function

void

 

Initialize()

Initialization functionality should be placed here

Protected function

void

 

Initialized()

Should be called when the handler is fully initialized on both remote and local

Public function Virtual Const

bool

 

IsActive()

Returns whether this handler is currently active

Public function Const

bool

 

IsInitialized()

Returns whether this handler is initialized

Public function Const

bool

 

IsValid()

Return whether this handler is valid

Public function Virtual

void

 

NotifyAnalyticsProvider()

Notification that the analytics provider has been updated

Public function Virtual

void

 

NotifyHandshakeBegin()

Notification to this component that it is ready to begin handshaking

Public function Virtual

void

 

Outgoing

(
    FBitWriter& Packet,
    FOutPacketTraits& Traits
)

Handles any outgoing packets

Public function Virtual

void

 

OutgoingConnectionless

(
    const TSharedPtr< const FInternetAd...,
    FBitWriter& Packet,
    FOutPacketTraits& Traits
)

Handles any outgoing packets not associated with a UNetConnection

Public function Const

bool

 

RequiresHandshake()

Returns whether this handler perform a network handshake during initialization

Public function Const

bool

 

RequiresReliability()

Returns whether this handler perform a network handshake during initialization

Public function Virtual

void

 

SetActive

(
    bool Active
)

Sets whether this handler is currently active

Protected function

void

 

SetState

(
    Handler::Component::State State
)

Sets the state of the handler

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

Tick functionality should be placed here

Deprecated Functions

Name Description

Public function Virtual

void

 

IncomingConnectionless

(
    const TSharedPtr< const FInternetAd...,
    FBitReader& Packet
)

Remove this function (no longer pure virtual, same with OutgoingConnectionless), or use the version which takes FReceivedPacketView.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss