|
rad
2.0.0
|
#include <msgRequestorRaw.hpp>
Public Types | |
| using | handler_t = std::function< void(const std::error_code &, std::string const &, const void *, const size_t)> |
| using | handler_t = std::function< void(const std::error_code &, std::string const &, const void *, const size_t)> |
Public Member Functions | |
| MsgRequestorRaw2 (const std::string &endpoint, const std::string &identity, boost::asio::io_service &io_ctx) | |
| ~MsgRequestorRaw2 () | |
| size_t | AsyncSendReceive (std::string const &payload_type, std::string const &payload, handler_t handler, std::chrono::milliseconds const timeout=std::chrono::milliseconds(0)) |
| size_t | AsyncSend (std::string const &payload_type, std::string const &payload) |
| void | AsyncReceive (handler_t handler, std::chrono::milliseconds const timeout=std::chrono::milliseconds(0)) |
| void | Cancel () noexcept |
| MsgRequestorRaw2 (const MsgRequestorRaw2 &)=delete | |
| MsgRequestorRaw2 & | operator= (const MsgRequestorRaw2 &)=delete |
| MsgRequestorRaw2 (MsgRequestorRaw2 &&)=default | |
| MsgRequestorRaw2 & | operator= (MsgRequestorRaw2 &&)=default |
| MsgRequestorRaw2 (const std::string &endpoint, const std::string &identity, boost::asio::io_service &io_ctx) | |
| ~MsgRequestorRaw2 () | |
| size_t | AsyncSendReceive (std::string const &payload_type, std::string const &payload, handler_t handler, std::chrono::milliseconds const timeout=std::chrono::milliseconds(0)) |
| size_t | AsyncSend (std::string const &payload_type, std::string const &payload) |
| void | AsyncReceive (handler_t handler, std::chrono::milliseconds const timeout=std::chrono::milliseconds(0)) |
| void | Cancel () noexcept |
| MsgRequestorRaw2 (const MsgRequestorRaw2 &)=delete | |
| MsgRequestorRaw2 & | operator= (const MsgRequestorRaw2 &)=delete |
| MsgRequestorRaw2 (MsgRequestorRaw2 &&)=default | |
| MsgRequestorRaw2 & | operator= (MsgRequestorRaw2 &&)=default |
Send requests and receive reply asynchrously.
Only one Async[Send]Receive operation may be live at any one point.
| using rad::MsgRequestorRaw2::handler_t = std::function<void(const std::error_code& , std::string const& , const void* , const size_t )> |
| using rad::MsgRequestorRaw2::handler_t = std::function<void(const std::error_code& , std::string const& , const void* , const size_t )> |
| rad::MsgRequestorRaw2::MsgRequestorRaw2 | ( | const std::string & | endpoint, |
| const std::string & | identity, | ||
| boost::asio::io_service & | io_ctx | ||
| ) |
| [in] | endpoint | Address of the request destination process. |
| [in] | identity | Identity of the originator of the request. |
| [in] | io_ctx | Reference to the event loop. |
Constructor for the MsgRequestorRaw2 class.
| [in] | endpoint | Address of the request destination process. |
| [in] | identity | Identity of the originator of the request. |
| [in] | io_ctx | Reference to the event loop. |
| rad::MsgRequestorRaw2::~MsgRequestorRaw2 | ( | ) |
Deleting object will cancel pending socket operations.
Destructor for the MsgRequestorRaw2 class.
|
delete |
|
default |
| rad::MsgRequestorRaw2::MsgRequestorRaw2 | ( | const std::string & | endpoint, |
| const std::string & | identity, | ||
| boost::asio::io_service & | io_ctx | ||
| ) |
| [in] | endpoint | Address of the request destination process. |
| [in] | identity | Identity of the originator of the request. |
| [in] | io_ctx | Reference to the event loop. |
| rad::MsgRequestorRaw2::~MsgRequestorRaw2 | ( | ) |
Deleting object will cancel pending socket operations.
|
delete |
|
default |
| void rad::MsgRequestorRaw2::AsyncReceive | ( | MsgRequestorRaw2::handler_t | handler, |
| std::chrono::milliseconds const | timeout = std::chrono::milliseconds(0) |
||
| ) |
Receive a response message from endpoint.
| handler | Completion handler for the asynchronous operation. |
| timeout | Request timeout. |
| void rad::MsgRequestorRaw2::AsyncReceive | ( | handler_t | handler, |
| std::chrono::milliseconds const | timeout = std::chrono::milliseconds(0) |
||
| ) |
Receive a response message from endpoint.
| handler | Completion handler for the asynchronous operation. |
| timeout | Request timeout. |
| size_t rad::MsgRequestorRaw2::AsyncSend | ( | std::string const & | payload_type, |
| std::string const & | payload | ||
| ) |
Send ZMQ message.
| payload_type | Type of the request's payload. |
| payload | Request's payload. |
| size_t rad::MsgRequestorRaw2::AsyncSend | ( | std::string const & | payload_type, |
| std::string const & | payload | ||
| ) |
Send ZMQ message.
| payload_type | Type of the request's payload. |
| payload | Request's payload. |
| size_t rad::MsgRequestorRaw2::AsyncSendReceive | ( | std::string const & | payload_type, |
| std::string const & | payload, | ||
| handler_t | handler, | ||
| std::chrono::milliseconds const | timeout = std::chrono::milliseconds(0) |
||
| ) |
Send a request message to an destination process and receive reply. This is a convenience function and is equivalent to calling AsyncSend and then AsyncReceive.
See AsyncSend and AsyncReceive for parameters.
| size_t rad::MsgRequestorRaw2::AsyncSendReceive | ( | std::string const & | payload_type, |
| std::string const & | payload, | ||
| handler_t | handler, | ||
| std::chrono::milliseconds const | timeout = std::chrono::milliseconds(0) |
||
| ) |
Send a request message to an destination process and receive reply. This is a convenience function and is equivalent to calling AsyncSend and then AsyncReceive.
See AsyncSend and AsyncReceive for parameters.
|
noexcept |
Cancels pending asynchronous operations.
Cancel any pending request/reply transaction.
|
noexcept |
Cancels pending asynchronous operations.
|
delete |
|
delete |
|
default |
|
default |
1.8.5