UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MessageRpcServer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "Containers/Map.h"
5#include "Containers/Ticker.h"
7#include "CoreTypes.h"
8#include "IMessageContext.h"
9#include "IMessageRpcServer.h"
10#include "Misc/DateTime.h"
11#include "Misc/Guid.h"
14
17class IAsyncProgress;
18class IAsyncTask;
19class IMessageBus;
24
25
30 : public IMessageRpcServer
31{
32public:
36
39
40public:
41
42 //~ IMessageRpcServer interface
43
45 MESSAGINGRPC_API virtual const FMessageAddress& GetAddress() const override;
47 virtual FOnMessageRpcNoHandler& OnNoHandler() override;
50 MESSAGINGRPC_API virtual void SetSendProgressUpdate(bool InSendProgress) override;
51protected:
53
62
64
67
70
72 MESSAGINGRPC_API void SendProgress(const FGuid& CallId, const FReturnInfo& ReturnInfo);
73
75 MESSAGINGRPC_API void SendResult(const FGuid& CallId, const FReturnInfo& ReturnInfo);
76
77protected:
78
81
82private:
83
86
88 bool HandleTicker(float DeltaTime);
89
90private:
91
94
95 /* Delegate that is executed when a received RPC message has no registered handler. */
97 FOnMessageRpcNoHandler NoHandlerDelegate;
99
100 /* Delegate that is executed when a received RPC message has no registered handler. */
101 FOnMessagePathNameRpcNoHandler NoHandlerDelegateWithPathName;
102
105
107 FTSTicker::FDelegateHandle TickerHandle;
108
110 bool bSendProgress = true;
111};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
Definition MessageEndpoint.h:70
Definition MessageRpcServer.h:31
MESSAGINGRPC_API FMessageRpcServer()
Definition MessageRpcServer.cpp:20
MESSAGINGRPC_API TSharedPtr< FMessageEndpoint, ESPMode::ThreadSafe > GetEndpoint() const
Definition MessageRpcServer.cpp:45
MESSAGINGRPC_API void SendResult(const FGuid &CallId, const FReturnInfo &ReturnInfo)
Definition MessageRpcServer.cpp:149
MESSAGINGRPC_API void ProcessCancelation(const FMessageRpcCancel &Message, const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Context)
Definition MessageRpcServer.cpp:82
virtual MESSAGINGRPC_API void AddHandler(const FTopLevelAssetPath &RequestMessageType, const TSharedRef< IMessageRpcHandler > &Handler) override
Definition MessageRpcServer.cpp:50
virtual MESSAGINGRPC_API ~FMessageRpcServer()
Definition MessageRpcServer.cpp:36
MESSAGINGRPC_API virtual PRAGMA_ENABLE_DEPRECATION_WARNINGS FOnMessagePathNameRpcNoHandler & OnNoHandlerWithPathName() override
Definition MessageRpcServer.cpp:69
virtual MESSAGINGRPC_API void SetSendProgressUpdate(bool InSendProgress) override
Definition MessageRpcServer.cpp:74
MESSAGINGRPC_API void SendProgress(const FGuid &CallId, const FReturnInfo &ReturnInfo)
Definition MessageRpcServer.cpp:133
MESSAGINGRPC_API void ProcessRequest(const TSharedRef< IMessageContext, ESPMode::ThreadSafe > &Context)
Definition MessageRpcServer.cpp:93
MESSAGINGRPC_API virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS FOnMessageRpcNoHandler & OnNoHandler() override
Definition MessageRpcServer.cpp:63
virtual MESSAGINGRPC_API const FMessageAddress & GetAddress() const override
Definition MessageRpcServer.cpp:56
TSharedPtr< FMessageEndpoint, ESPMode::ThreadSafe > MessageEndpoint
Definition MessageRpcServer.h:80
Definition MessagingRpcModule.cpp:14
Definition IAsyncProgress.h:13
Definition IAsyncTask.h:37
Definition IMessageBus.h:114
Definition IMessageRpcHandler.h:15
Definition IMessageRpcReturn.h:13
Definition IMessageRpcServer.h:26
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition SharedPointer.h:153
Definition DateTime.h:76
Definition Guid.h:109
Definition IMessageContext.h:26
Definition MessageEndpointBuilder.h:18
Definition MessageRpcMessages.h:15
Definition MessageRpcServer.h:55
FMessageAddress ClientAddress
Definition MessageRpcServer.h:56
TSharedPtr< IAsyncTask > Task
Definition MessageRpcServer.h:60
FDateTime LastProgressSent
Definition MessageRpcServer.h:57
TSharedPtr< IMessageRpcReturn > Return
Definition MessageRpcServer.h:59
TSharedPtr< IAsyncProgress > Progress
Definition MessageRpcServer.h:58
Definition TopLevelAssetPath.h:38