IConcertClientDataStore::RegisterChangeNotificationHandler

Registers(or replaces) a handler invoked every time another client successfully adds or updates the specified key.

Windows
MacOS
Linux

References

Module

ConcertSyncClient

Header

/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Public/IConcertClientDataStore.h

Include

#include "IConcertClientDataStore.h"

Syntax

template<typename T>
void RegisterChangeNotificationHandler
(
    const FName & InKey,
    const TFunction< void &, TOptional< T >)> & Handler,
    EConcertDataStoreChangeNotificationOptions Options
)

Remarks

Registers(or replaces) a handler invoked every time another client successfully adds or updates the specified key. The server pushes a notification for the added/updated key to all clients except the one that performed the change. By default, the data store immediately calls back the client if the key value is known. This is recommended to prevent calling FetchAs() and RegisterChangeNotificationHandler() in a non-safe order where a key/value could be missed if it appears between a failed fetch and the successful registration of a handler. By default, the handler will be called even if the key type expected by the client doesn't match the stored type. In such case, the handler optional value is not set.

Parameters

Parameter

Description

InKey

The key to observe.

Handler

The function to call back with the latest value. See the EChangeNotificationOptions flags.

Options

A set of EChangeNotificationOptions flags.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss