Skip to content

TExchangeCallData

CallData for bidirectional exchange RPCs; fulfills a future when a request is ready.

template <class ServiceType, typename RequestType, typename ResponseType>
class TExchangeCallData
: public TCallData<ServiceType, RequestType, ResponseType>

Methods

Public

TExchangeCallData

inline TExchangeCallData(ServiceType *Service, ServerCompletionQueue *CQueue,
CallData::AsyncAPIHandler TargetRPC,
bool bIsFirst = false)

Parameters

  • Service (ServiceType)

  • CQueue (ServerCompletionQueue)

  • TargetRPC (CallData::AsyncAPIHandler)

  • bIsFirst (bool, default: false)


GetRequestFuture

inline TFuture<const RequestType *> GetRequestFuture()

Get a future representing an eventual request from a client.


FulfillRequestPromise

inline void FulfillRequestPromise()

Send a request from a client to any consumers in Unreal.


DefaultOnRequestPromise

inline void DefaultOnRequestPromise()

Send a default value to the Unreal-side consumer.


Fail

inline void Fail()

Resets the pending request future to a default-constructed request after a failure path.


CanSubmit

inline bool CanSubmit()

Is this RPC ready to be completed.

Protected

CallData

using CallData = TCallData<ServiceType, RequestType, ResponseType>

Base CallData type for this RPC shape.

Attributes

Public

bHasRequest

bool bHasRequest = false

True once FulfillRequestPromise has run for the current exchange.


bIsFirst

bool bIsFirst = false

True for the initial CallData that bootstraps the RPC stream.

Protected

RequestPromise

TPromise<const RequestType *> RequestPromise

Promise completed when an incoming request is ready for Unreal to consume.

Source: Source/ScholaProtobuf/Public/ProtobufBackends/gRPC/ExchangeRPCBackend.h