UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
FCallbackManager Class Reference

Manages callbacks for asynchronous method invocations in SignalR connections. More...

#include <CallbackManager.h>

Public Member Functions

 FCallbackManager ()
 
 ~FCallbackManager ()
 
TTuple< FName, IHubConnection::FOnMethodCompletion & > RegisterCallback ()
 Registers a new callback and returns its ID along with a reference to the callback.
 
bool InvokeCallback (FName InCallbackId, const FSignalRValue &InArguments, bool InRemoveCallback)
 Invokes a callback with the specified arguments.
 
bool RemoveCallback (FName InCallbackId)
 Removes a callback with the specified ID.
 
void Clear (const FString &ErrorMessage)
 Removes all callbacks and invokes them with the specified error message.
 

Detailed Description

Manages callbacks for asynchronous method invocations in SignalR connections.

Provides thread-safe registration and invocation of callbacks for hub methods. This class is thread-safe and can be accessed from multiple threads simultaneously.

Constructor & Destructor Documentation

◆ FCallbackManager()

FCallbackManager::FCallbackManager ( )

◆ ~FCallbackManager()

FCallbackManager::~FCallbackManager ( )

Member Function Documentation

◆ Clear()

void FCallbackManager::Clear ( const FString & ErrorMessage)

Removes all callbacks and invokes them with the specified error message.

Parameters
ErrorMessageThe error message to pass to the callbacks.

◆ InvokeCallback()

bool FCallbackManager::InvokeCallback ( FName InCallbackId,
const FSignalRValue & InArguments,
bool InRemoveCallback )

Invokes a callback with the specified arguments.

Parameters
InCallbackIdThe ID of the callback to invoke.
InArgumentsThe arguments to pass to the callback.
InRemoveCallbackWhether to remove the callback after invoking it.
Returns
True if the callback was found and invoked, false otherwise.

◆ RegisterCallback()

TTuple< FName, IHubConnection::FOnMethodCompletion & > FCallbackManager::RegisterCallback ( )

Registers a new callback and returns its ID along with a reference to the callback.

Returns
A tuple containing the callback ID and a reference to the callback.

◆ RemoveCallback()

bool FCallbackManager::RemoveCallback ( FName InCallbackId)

Removes a callback with the specified ID.

Parameters
InCallbackIdThe ID of the callback to remove.
Returns
True if the callback was found and removed, false otherwise.

The documentation for this class was generated from the following files: