Skip to content

IExchangeBackend

A Generic Interface for any service that can be used to exchange messages of type In and Out asynchronously.

template <typename In, typename Out>
class IExchangeBackend : public IProtobufBackend

Methods

Receive

virtual TFuture<const In *> Receive() = 0

Initiate an Exchange with the Client.


Respond

virtual void Respond(Out *Response) = 0

Respond to a message from the client.

Parameters

  • Response (Out)

Respond

template <typename UnrealType>
inline void Respond(const UnrealType &InUnrealObject)

Serialize an Unreal value to protobuf and send it as the exchange response.

Parameters

  • InUnrealObject (const UnrealType)

Reset

virtual void Reset() = 0

Reset the backend to clear any stale exchange state from previous connections.


Receive

template <typename UnrealType> inline TFuture<UnrealType *> Receive()

Do an exchange before converting the protomessage into the specified type.

Source: Source/ScholaProtobuf/Public/ProtobufBackends/ExchangeBackend.h