Class ExchangeRPCBackend
-
template<class ServiceType, typename RequestType, typename ResponseType>
class ExchangeRPCBackend : public RPCBackend<ServiceType, RequestType, ResponseType>, public IExchangeBackendInterface<RequestType, ResponseType> -
Public Functions
- inline ExchangeRPCBackend(RPCBackend::AsyncRPCHandle TargetRPC, std::shared_ptr<ServiceType> Service, std::unique_ptr<ServerCompletionQueue> CQueue)
- inline virtual TFuture<const RequestType*> Receive() override
-
Initiate an Exchange with the Client.
- Returns:
-
A future that will be fulfilled with the result of the exchange. The value ptr from the future is valid until the next time exchange is called.
- inline virtual void Respond(ResponseType *Response) override
-
Respond to a message from the client.
- Parameters:
-
Response – [in] The message to send to the client
- inline virtual void Initialize()
-
Perform any setup that happens prior to establishing any external connection.
this could include opening a socket and waiting for a connection.