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"
7
8#if WITH_XMPP_STROPHE
9
10class FStropheStanza;
12class FXmppUserJid;
13class IWebSocket;
14
15typedef struct _xmpp_conn_t xmpp_conn_t;
16
18{
19public:
20 explicit FStropheWebsocketConnection(FStropheContext& InContext, const FString& Url);
22
23 // Do not allow copies/assigns
28
36 bool Connect(const FXmppUserJid& UserJid, const FString& Password, FXmppConnectionStrophe& ConnectionManager);
38 void Disconnect();
39
42
44 void Tick();
45
46private:
48
50
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 */
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
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32 Size
Definition VulkanMemory.cpp:4034
Definition XmppConnection.h:99
Definition IWebSocket.h:7
Definition SharedPointer.h:692