Manages callbacks for asynchronous method invocations in SignalR connections.
More...
#include <CallbackManager.h>
|
| 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.
|
|
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.
◆ FCallbackManager()
FCallbackManager::FCallbackManager |
( |
| ) |
|
◆ ~FCallbackManager()
FCallbackManager::~FCallbackManager |
( |
| ) |
|
◆ Clear()
void FCallbackManager::Clear |
( |
const FString & | ErrorMessage | ) |
|
Removes all callbacks and invokes them with the specified error message.
- Parameters
-
ErrorMessage | The 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
-
InCallbackId | The ID of the callback to invoke. |
InArguments | The arguments to pass to the callback. |
InRemoveCallback | Whether 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
-
InCallbackId | The 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: