Skip to content

TConsumerRPCBackend

gRPC consumer backend: polls async RPCs and exposes dequeued requests to Unreal.

template <class ServiceType, typename RequestType, typename ResponseType>
class TConsumerRPCBackend
: public TRPCBackend<ServiceType, RequestType, ResponseType>,
public IConsumerBackend<RequestType>

Methods

TConsumerRPCBackend

inline TConsumerRPCBackend(gRPCBackend::AsyncRPCHandle TargetRPC,
std::shared_ptr<ServiceType> Service,
std::unique_ptr<ServerCompletionQueue> CQueue)

Parameters

  • TargetRPC (gRPCBackend::AsyncRPCHandle)

  • Service (std::shared_ptr<ServiceType>)

  • CQueue (std::unique_ptr<ServerCompletionQueue>)


TConsumerRPCBackend

inline ~TConsumerRPCBackend()

Poll

inline virtual TOptional<const RequestType *> Poll() override

Poll the Backend for a message from the client.


Initialize

inline virtual void Initialize()

Perform any setup that happens prior to establishing any external connection.


Start

inline virtual void Start() override

Seeds initial CallData and starts the completion-queue worker thread.


Establish

inline virtual void Establish()

Perform any setup that involves handshakes with the external communication (e.g.


Shutdown

inline virtual void Shutdown() override

Close the external connection.


Restart

inline virtual void Restart()

Reset the Communication backend.

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