StatelessConnectHandlerComponent

[PacketHandler](API\Runtime\PacketHandler\PacketHandler) component for implementing a stateless (non-memory-consuming) connection handshake

Windows
MacOS
Linux

Inheritance Hierarchy

HandlerComponent

StatelessConnectHandlerComponent

References

Module

Engine

Header

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

Include

#include "PacketHandlers/StatelessConnectHandlerComponent.h"

Syntax

class StatelessConnectHandlerComponent : public HandlerComponent

Remarks

PacketHandler component for implementing a stateless (non-memory-consuming) connection handshake

Partially based on the Datagram Transport Layer Security protocol.

Constructors

Name Description

Public function

StatelessConnectHandlerComponent()

Base constructor

Functions

Name Description

Public function Const

bool

 

DoesRestartedHandshakeMatch

When a restarted handshake is completed, this is used to match it up with the existing NetConnection

Public function Const

void

 

GetChallengeSequence

(
    int32& OutServerSequence,
    int32& OutClientSequence
)

Used for retrieving the initial packet sequence values from the handshake data, after a successful challenge

Public function Const

bool

 

HasPassedChallenge

(
    const TSharedPtr< const FInternetAd...,
    bool& bOutRestartedHandshake
)

Whether or not the specified connection address, has just passed the connection handshake challenge.

Public function

void

 

InitFromConnectionless

Initializes a serverside UNetConnection-associated StatelessConnect, from the connectionless StatelessConnect that negotiated the handshake.

Public function

void

 

ResetChallengeData()

Used to reset cached handshake success/fail state, when done processing it

Public function

void

 

SetDriver

(
    UNetDriver* InDriver
)

Sets the net driver this handler is associated with

Overridden from HandlerComponent

Name Description

Protected 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
)

Protected function Virtual Const

int32

 

GetReservedPacketBits()

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

Protected function Virtual

void

 

Incoming

(
    FBitReader& Packet
)

Handles incoming packets

Protected function Virtual

void

 

IncomingConnectionless

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

Handles incoming packets not associated with a UNetConnection

Protected function Virtual

void

 

Initialize()

Initialization functionality should be placed here

Public function Virtual Const

bool

 

IsValid()

Return whether this handler is valid

Public function Virtual

void

 

NotifyHandshakeBegin()

Notification to this component that it is ready to begin handshaking

Protected function Virtual

void

 

Outgoing

(
    FBitWriter& Packet,
    FOutPacketTraits& Traits
)

Handles any outgoing packets

Protected function Virtual

void

 

OutgoingConnectionless

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

Handles any outgoing packets not associated with a UNetConnection

Protected function Virtual

void

 

Tick

(
    float DeltaTime
)

Tick functionality should be placed here

Deprecated Functions

Name Description

Public function Const

bool

 

HasPassedChallenge

(
    const FString& Address
)

HasPassedChallenge must return bOutRestartedHandshake, in order to correctly process the challenge. Use the new version

Public function Const

bool

 

HasPassedChallenge

(
    const FString& Address,
    bool& bOutRestartedHandshake
)

HasPassedChallenge should pass a FInternetAddr pointer for faster address checking

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback