engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | 所有成员列表
StatelessConnectHandlerComponent类 参考

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

#include <StatelessConnectHandlerComponent.h>

+ 类 StatelessConnectHandlerComponent 继承关系图:

Public 成员函数

FORCEINLINE bool DoesRestartedHandshakeMatch (StatelessConnectHandlerComponent &NetConnComponent) const
 When a restarted handshake is completed, this is used to match it up with the existing NetConnection 更多...
 
FORCEINLINE void GetChallengeSequence (int32 &OutServerSequence, int32 &OutClientSequence) const
 Used for retrieving the initial packet sequence values from the handshake data, after a successful challenge 更多...
 
FORCEINLINE bool HasPassedChallenge (const FString &Address) const
 Whether or not the specified connection address, has just passed the connection handshake challenge. 更多...
 
FORCEINLINE bool HasPassedChallenge (const FString &Address, bool &bOutRestartedHandshake) const
 Whether or not the specified connection address, has just passed the connection handshake challenge. 更多...
 
FORCEINLINE bool HasPassedChallenge (const TSharedPtr< const FInternetAddr > &Address, bool &bOutRestartedHandshake) const
 Whether or not the specified connection address, has just passed the connection handshake challenge. 更多...
 
void InitFromConnectionless (StatelessConnectHandlerComponent *InConnectionlessHandler)
 Initializes a serverside UNetConnection-associated StatelessConnect, from the connectionless StatelessConnect that negotiated the handshake. 更多...
 
virtual bool IsValid () const override
 Return whether this handler is valid
 
virtual void NotifyHandshakeBegin () override
 Notification to this component that it is ready to begin handshaking
 
FORCEINLINE void ResetChallengeData ()
 Used to reset cached handshake success/fail state, when done processing it
 
void SetDriver (UNetDriver *InDriver)
 Sets the net driver this handler is associated with 更多...
 
 StatelessConnectHandlerComponent ()
 Base constructor
 
- Public 成员函数 继承自 HandlerComponent
virtual bool CanReadUnaligned () const
 Whether or not the Incoming/IncomingConnectionless implementations, support reading Packets that aren't aligned at bit position 0 (i.e. 更多...
 
FName GetName () const
 Returns the name of this component.
 
virtual int32 GetReservedPacketBits () const =0
 Returns the amount of reserved packet/protocol bits expected from this component. 更多...
 
 HandlerComponent ()
 Base constructor
 
 HandlerComponent (FName InName)
 Constructor that accepts a name
 
virtual void Incoming (FBitReader &Packet)
 Handles incoming packets 更多...
 
virtual void IncomingConnectionless (FIncomingPacketRef PacketRef)
 Handles incoming packets not associated with a UNetConnection 更多...
 
virtual void Initialize ()=0
 Initialization functionality should be placed here
 
virtual bool IsActive () const
 Returns whether this handler is currently active
 
bool IsInitialized () const
 Returns whether this handler is initialized
 
virtual bool IsValid () const =0
 Return whether this handler is valid
 
virtual void NotifyAnalyticsProvider ()
 Notification that the analytics provider has been updated NOTE: Can also mean disabled, e.g. 更多...
 
virtual void NotifyHandshakeBegin ()
 Notification to this component that it is ready to begin handshaking
 
virtual void Outgoing (FBitWriter &Packet, FOutPacketTraits &Traits)
 Handles any outgoing packets 更多...
 
virtual void OutgoingConnectionless (const TSharedPtr< const FInternetAddr > &Address, FBitWriter &Packet, FOutPacketTraits &Traits)
 Handles any outgoing packets not associated with a UNetConnection 更多...
 
bool RequiresHandshake () const
 Returns whether this handler perform a network handshake during initialization
 
bool RequiresReliability () const
 Returns whether this handler perform a network handshake during initialization
 
virtual void SetActive (bool Active)
 Sets whether this handler is currently active 更多...
 
virtual void Tick (float DeltaTime)
 Tick functionality should be placed here
 
virtual ~HandlerComponent ()
 Base destructor
 

Protected 成员函数

virtual bool CanReadUnaligned () const override
 Whether or not the Incoming/IncomingConnectionless implementations, support reading Packets that aren't aligned at bit position 0 (i.e. 更多...
 
virtual int32 GetReservedPacketBits () const override
 Returns the amount of reserved packet/protocol bits expected from this component. 更多...
 
virtual void Incoming (FBitReader &Packet) override
 Handles incoming packets 更多...
 
virtual void IncomingConnectionless (FIncomingPacketRef PacketRef) override
 Handles incoming packets not associated with a UNetConnection 更多...
 
virtual void Initialize () override
 Initialization functionality should be placed here
 
virtual void Outgoing (FBitWriter &Packet, FOutPacketTraits &Traits) override
 Handles any outgoing packets 更多...
 
virtual void Tick (float DeltaTime) override
 Tick functionality should be placed here
 
- Protected 成员函数 继承自 HandlerComponent
void Initialized ()
 Should be called when the handler is fully initialized on both remote and local
 
void SetState (Handler::Component::State State)
 Sets the state of the handler 更多...
 

额外继承的成员函数

- Public 属性 继承自 HandlerComponent
PacketHandler * Handler
 The manager of the handler, set in initialization
 
- Protected 属性 继承自 HandlerComponent
bool bRequiresHandshake
 Whether this handler has to perform a network handshake during initialization (requires waiting on other HandlerComponent's)
 
bool bRequiresReliability
 Whether this handler depends upon the ReliabilityHandlerComponent being enabled
 
uint32 MaxOutgoingBits
 Maximum number of Outgoing packet bits supported (automatically calculated to factor in other HandlerComponent reserved bits)
 
Handler::Component::State State
 The state of this handler
 

详细描述

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

Partially based on the Datagram Transport Layer Security protocol.

成员函数说明

◆ CanReadUnaligned()

virtual bool StatelessConnectHandlerComponent::CanReadUnaligned ( ) const
inlineoverrideprotectedvirtual

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)

返回
Whether or not the above is supported

重载 HandlerComponent .

◆ DoesRestartedHandshakeMatch()

FORCEINLINE bool StatelessConnectHandlerComponent::DoesRestartedHandshakeMatch ( StatelessConnectHandlerComponent &  NetConnComponent) const
inline

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

参数
NetConnComponentThe NetConnection StatelessConnectHandlerComponent, which is being checked for a match
返回
Whether or not the specified component, belongs to the client which restarted the handshake

◆ GetChallengeSequence()

FORCEINLINE void StatelessConnectHandlerComponent::GetChallengeSequence ( int32 &  OutServerSequence,
int32 &  OutClientSequence 
) const
inline

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

参数
OutServerSequenceOutputs the initial sequence for the server
OutClientSequenceOutputs the initial sequence for the client

◆ GetReservedPacketBits()

virtual int32 StatelessConnectHandlerComponent::GetReservedPacketBits ( ) const
overrideprotectedvirtual

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

IMPORTANT: This MUST be accurate, and should represent the worst-case number of reserved bits expected from the component. If this is inaccurate, packets will randomly fail to send, in rare cases which are extremely hard to trace.

返回
The worst-case reserved packet bits for the component

实现了 HandlerComponent.

◆ HasPassedChallenge() [1/3]

FORCEINLINE bool StatelessConnectHandlerComponent::HasPassedChallenge ( const FString &  Address) const
inline

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

参数
AddressThe address (including port, for UIpNetDriver) being checked

◆ HasPassedChallenge() [2/3]

FORCEINLINE bool StatelessConnectHandlerComponent::HasPassedChallenge ( const FString &  Address,
bool &  bOutRestartedHandshake 
) const
inline

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

参数
AddressThe address (including port, for UIpNetDriver) being checked
bOutRestartedHandshakeWhether or not the passed challenge, was a restarted handshake for an existing NetConnection

◆ HasPassedChallenge() [3/3]

FORCEINLINE bool StatelessConnectHandlerComponent::HasPassedChallenge ( const TSharedPtr< const FInternetAddr > &  Address,
bool &  bOutRestartedHandshake 
) const
inline

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

参数
AddressThe address (including port, for UIpNetDriver) being checked
bOutRestartedHandshakeWhether or not the passed challenge, was a restarted handshake for an existing NetConnection

◆ Incoming()

virtual void StatelessConnectHandlerComponent::Incoming ( FBitReader &  Packet)
overrideprotectedvirtual

Handles incoming packets

参数
PacketThe packet to be handled

重载 HandlerComponent .

◆ IncomingConnectionless()

virtual void StatelessConnectHandlerComponent::IncomingConnectionless ( FIncomingPacketRef  PacketRef)
overrideprotectedvirtual

Handles incoming packets not associated with a UNetConnection

参数
PacketRefReference of the packet being processed

重载 HandlerComponent .

◆ InitFromConnectionless()

void StatelessConnectHandlerComponent::InitFromConnectionless ( StatelessConnectHandlerComponent *  InConnectionlessHandler)

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

参数
InConnectionlessHandlerThe connectionless StatelessConnect we're initializing from

◆ Outgoing()

virtual void StatelessConnectHandlerComponent::Outgoing ( FBitWriter &  Packet,
FOutPacketTraits &  Traits 
)
overrideprotectedvirtual

Handles any outgoing packets

参数
PacketThe packet to be handled
TraitsTraits for the packet, passed down through the packet pipeline (likely from the NetConnection)

重载 HandlerComponent .

◆ SetDriver()

void StatelessConnectHandlerComponent::SetDriver ( UNetDriver *  InDriver)

Sets the net driver this handler is associated with

参数
InDriverThe net driver to set

该类的文档由以下文件生成: