UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StropheWebsocketConnection.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 "
XmppStrophe/StropheContext.h
"
7
8
#if WITH_XMPP_STROPHE
9
10
class
FStropheStanza
;
11
class
FXmppConnectionStrophe
;
12
class
FXmppUserJid
;
13
class
IWebSocket
;
14
15
typedef
struct
_xmpp_conn_t
xmpp_conn_t
;
16
17
class
FStropheWebsocketConnection
18
{
19
public
:
20
explicit
FStropheWebsocketConnection
(
FStropheContext
&
InContext
,
const
FString& Url);
21
~FStropheWebsocketConnection
();
22
23
// Do not allow copies/assigns
24
FStropheWebsocketConnection
(
const
FStropheWebsocketConnection
&
Other
) =
delete
;
25
FStropheWebsocketConnection
(
FStropheWebsocketConnection
&&
Other
) =
delete
;
26
FStropheWebsocketConnection
& operator=(
const
FStropheWebsocketConnection
&
Other
) =
delete
;
27
FStropheWebsocketConnection
& operator=(
FStropheWebsocketConnection
&&
Other
) =
delete
;
28
36
bool
Connect
(
const
FXmppUserJid
& UserJid,
const
FString& Password,
FXmppConnectionStrophe
&
ConnectionManager
);
38
void
Disconnect
();
39
41
bool
SendStanza
(
FStropheStanza
&&
Stanza
);
42
44
void
Tick
();
45
46
private
:
47
FStropheContext
&
Context
;
48
49
TSharedPtr<IWebSocket>
Websocket
;
50
51
xmpp_conn_t
*
XmppConnectionPtr
;
52
53
/* Handlers for strophe external socket events */
54
static
void
WebsocketConnectHandler
(
void
*
const
Userdata
);
55
static
void
WebsocketCloseHandler
(
void
*
const
Userdata
);
56
static
void
WebsocketSendHandler
(
const
char
*
const
Data,
const
size_t
Length
,
void
*
const
Userdata
);
57
58
void
WebsocketConnect
();
59
void
WebsocketClose
();
60
void
WebsocketSend
(
const
char
*
const
Data,
const
size_t
Length
);
61
62
/* Handlers for websocket events */
63
void
OnWebsocketConnected
();
64
void
OnWebsocketConnectionError
(
const
FString&
Error
);
65
void
OnWebsocketClosed
(
int32
StatusCode,
const
FString& Reason,
bool
bWasClean
);
66
void
OnRawMessage(
const
void
* Data,
SIZE_T
Size
,
SIZE_T
BytesRemaining
);
67
};
68
69
#endif
EARSessionStatus::Other
@ Other
EAppleControllerEventType::Disconnect
@ Disconnect
EAppleControllerEventType::Connect
@ Connect
CoreMinimal.h
SIZE_T
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition
Platform.h:1150
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
EBackgroundNSURLCDNInfoResponse::Error
@ Error
EMaterialExpressionOperatorKind::Length
@ Length
EUpdateClockSource::Tick
@ Tick
StropheContext.h
Size
uint32 Size
Definition
VulkanMemory.cpp:4034
EVulkanSyncPointType::Context
@ Context
FXmppUserJid
Definition
XmppConnection.h:99
IWebSocket
Definition
IWebSocket.h:7
TSharedPtr
Definition
SharedPointer.h:692
Engine
Source
Runtime
Online
XMPP
Private
XmppStrophe
StropheWebsocketConnection.h
Generated by
1.9.8