MIRA
Public Types | Public Member Functions | List of all members
BinaryRPCBackendTempl< BinaryFormatVersion >::ClientResponse Class Reference

Binary client-side response. More...

#include <rpc/BinaryRPCBackend.h>

Public Types

enum  ReturnStatus { RETURN_VOID =0, RETURN_RESULT, RETURN_EXCEPTION }
 

Public Member Functions

 ClientResponse (ContainerType *buffer)
 
void getHeader (std::string &callId)
 Read the response header (i.e. More...
 
template<typename R >
void getReturn (boost::promise< R > &promise)
 Obtain return value from response and set it using promise.set_value() or set exception using promise.set_exception(). More...
 

Detailed Description

template<uint8 BinaryFormatVersion>
class mira::BinaryRPCBackendTempl< BinaryFormatVersion >::ClientResponse

Binary client-side response.

The response must have been created by the RPCServer and it must be contained in the buffer that is passed in the constructor.

See also
Backends

Member Enumeration Documentation

◆ ReturnStatus

Enumerator
RETURN_VOID 
RETURN_RESULT 
RETURN_EXCEPTION 

Constructor & Destructor Documentation

◆ ClientResponse()

ClientResponse ( ContainerType buffer)
inline

Member Function Documentation

◆ getHeader()

void getHeader ( std::string &  callId)
inline

Read the response header (i.e.

the call id of the RPC call) from the response. This method is called first by the RPCClient when a response is handled

◆ getReturn()

void getReturn ( boost::promise< R > &  promise)
inline

Obtain return value from response and set it using promise.set_value() or set exception using promise.set_exception().

See documentation of boost::promise and boost::future for details about futures and promises. This method is called after getHeader().


The documentation for this class was generated from the following file: