UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
XmppPingStrophe.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#include "
CoreMinimal.h
"
6
#include "Containers/Queue.h"
7
#include "
XmppConnection.h
"
8
#include "Containers/Queue.h"
9
#include "
Containers/Ticker.h
"
10
#include "
HAL/ThreadSafeBool.h
"
11
12
class
FXmppConnectionStrophe
;
13
class
FStropheStanza
;
14
15
#if WITH_XMPP_STROPHE
16
17
struct
FXmppPingReceivedInfo
18
{
19
public
:
20
FXmppUserJid
FromJid;
21
FString
PingId
;
22
23
public
:
24
FXmppPingReceivedInfo
()
25
{
26
}
27
28
FXmppPingReceivedInfo
(
FXmppUserJid
&&
InFromJid
, FString&&
InPingId
)
29
: FromJid(
MoveTemp
(
InFromJid
))
30
,
PingId
(
MoveTemp
(
InPingId
))
31
{
32
}
33
};
34
35
class
FXmppPingStrophe
36
:
public
FTSTickerObjectBase
37
{
38
public
:
39
// FXmppPingStrophe
40
FXmppPingStrophe
(
FXmppConnectionStrophe
&
InConnectionManager
);
41
virtual
~FXmppPingStrophe
();
42
43
// FTSTickerObjectBase
44
virtual
bool
Tick
(
float
DeltaTime)
override
;
45
47
void
OnDisconnect
();
48
void
OnReconnect
();
49
51
bool
ReceiveStanza
(
const
FStropheStanza
&
IncomingStanza
);
52
54
void
ResetPingTimer
();
55
57
void
ResetPongTimer
();
58
59
protected
:
61
bool
HandlePingStanza
(
const
FStropheStanza
&
PingStanza
);
62
64
void
ReplyToPing
(
FXmppPingReceivedInfo
&&
ReceivedPing
);
65
67
void
SendClientPing
();
68
70
void
CheckXmppPongTimeout
(
float
DeltaTime);
71
73
void
CleanupMessages
();
74
75
private
:
77
FXmppConnectionStrophe
&
ConnectionManager
;
78
80
TQueue<FXmppPingReceivedInfo>
IncomingPings
;
81
83
float
TimeSinceLastClientPing
;
84
86
bool
bWaitingForPong
;
87
89
float
SecondsSinceLastServerPong
;
90
92
FThreadSafeBool
bHasReceievedServerPong
;
93
95
int32
MissedPongs
;
96
};
97
98
#endif
CoreMinimal.h
int32
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition
Platform.h:1125
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EUpdateClockSource::Tick
@ Tick
ThreadSafeBool.h
Ticker.h
MoveTemp
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition
UnrealTemplate.h:520
XmppConnection.h
FTSTickerObjectBase
Definition
Ticker.h:137
FThreadSafeBool
Definition
ThreadSafeBool.h:17
FXmppUserJid
Definition
XmppConnection.h:99
TQueue
Definition
Queue.h:48
Engine
Source
Runtime
Online
XMPP
Private
XmppStrophe
XmppPingStrophe.h
Generated by
1.9.8