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

Binary server-side request. More...

#include <rpc/BinaryRPCBackend.h>

Public Member Functions

 ServerRequest (ContainerType *buffer)
 
void getHeader (std::string &oCallId, std::string &oService)
 Read the request header including the call ID, the service name and the signature of the method. More...
 
bool checkSignature (const RPCSignature &signature)
 Check, if the passed signature is compatible with the signature that was read from the request header in the previous getHeader() call above. More...
 
const RPCSignaturegetSignature ()
 Return the signature, that was read from the request header in the previous getHeader() call above. More...
 
template<typename P >
void getParameter (P &oParam)
 Read and deserializes the next parameter from the request. More...
 

Detailed Description

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

Binary server-side request.

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

See also
Backends

Constructor & Destructor Documentation

◆ ServerRequest()

ServerRequest ( ContainerType buffer)
inline

Member Function Documentation

◆ getHeader()

void getHeader ( std::string &  oCallId,
std::string &  oService 
)
inline

Read the request header including the call ID, the service name and the signature of the method.

The call ID and the service name must be returned via the by-reference parameters. The signature should be stored internally to be able to handle the methods below. This method is called first when a new request is handled by the RPCServer.

◆ checkSignature()

bool checkSignature ( const RPCSignature signature)
inline

Check, if the passed signature is compatible with the signature that was read from the request header in the previous getHeader() call above.

◆ getSignature()

const RPCSignature& getSignature ( )
inline

Return the signature, that was read from the request header in the previous getHeader() call above.

◆ getParameter()

void getParameter ( P &  oParam)
inline

Read and deserializes the next parameter from the request.

This method is called multiple times for each parameter of the RPC method.


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