|
rad 6.2.0
|
#include <smRequestor.hpp>
Public Member Functions | |
| SMRequestor (const std::string &endpoint, const std::string &identity, boost::asio::io_context &ios, SMAdapter &sm, UniqueEvent &&ok_event, UniqueEvent &&err_event, UniqueEvent &&timeout_event) | |
| virtual | ~SMRequestor () |
| size_t | Send (const TYPEREQ &payload, const long timeout=0) |
| const TYPEREP & | GetReplyPayload () |
| SMRequestor (const SMRequestor &)=delete | |
| SMRequestor & | operator= (const SMRequestor &)=delete |
This class allows to send requests and, when a reply is received to trigger one of the following events:
| rad::SMRequestor< TYPEREQ, TYPEREP >::SMRequestor | ( | const std::string & | endpoint, |
| const std::string & | identity, | ||
| boost::asio::io_context & | ios, | ||
| SMAdapter & | sm, | ||
| UniqueEvent && | ok_event, | ||
| UniqueEvent && | err_event, | ||
| UniqueEvent && | timeout_event ) |
Constructor for the SMRequestor class.
| [in] | endpoint | Where to send the request. |
| [in] | identity | Identity of the request (used by ZMQ to associated the reply). |
| [in] | ios | Reference to the event loop. |
| [in] | sm | SM Adapter used to trigger events. |
| [in] | ok_event | OK event associated to an OK reply. |
| [in] | err_event | ERR event associated to an Error reply. |
| [in] | timeout_event | Timeout event associated to a missing reply. |
|
virtual |
Denstructor for the SMRequestor class.
|
delete |
| const TYPEREP & rad::SMRequestor< TYPEREQ, TYPEREP >::GetReplyPayload | ( | ) |
|
delete |
| size_t rad::SMRequestor< TYPEREQ, TYPEREP >::Send | ( | const TYPEREQ & | payload, |
| const long | timeout = 0 ) |
Send a request message to an destination process.
| payload | Request's payload. |
| timeout | Timeout in msec. |