|
pars 0.2.1
|
#include <op.h>
Public Member Functions | |
| ~op () | |
| operator bool () | |
| template<ev::event_c event_t, tool_c tool_t> | |
| void | send (ev::enqueuer &r, tool_t &t, pipe p, event_t ev) |
| template<tool_c tool_t> | |
| void | recv (ev::enqueuer &r, tool_t &t) |
| void | sleep (nng_duration ms, std::function< void()> f) |
| void | reset_sleep (nng_duration ms) |
| std::error_code | result () const |
| return result of asynchronous operation | |
| void | abort (nngxx::err err) |
| abort asynchronous I/O operation | |
| void | cancel () |
| cancel asynchronous I/O operation | |
| void | wait () const |
| wait for asynchronous I/O operation | |
| void | stop () |
| stop asynchronous I/O operation | |
|
inline |
|
inline |
abort asynchronous I/O operation
| err |
The abort() function aborts an operation previously started with the handle aio.
If the operation is aborted, then the callback for the handle will be called, and the function result() will return the error err.
Definition at line 194 of file op.h.
References pars::err().

|
inline |
cancel asynchronous I/O operation
The nng_aio_cancel() function aborts an operation previously started with the handle aio. If the operation is aborted, then the callback for the handle will be called, and the function nng_aio_result() will return the error NNG_ECANCELED.
This function does not wait for the operation to be fully aborted, but returns immediately.
If no operation is currently in progress (either because it has already finished, or no operation has been started yet), then this function has no effect.
Same as abort(nngxx::error::canceled)
Definition at line 213 of file op.h.
|
inlineexplicit |
|
inline |
Definition at line 107 of file op.h.
References pars::debug(), pars::err(), pars::net::in, pars::net, pars::ev::enqueuer::queue_fire(), pars::ev::enqueuer::queue_received(), and SL.

|
inline |
|
inline |
return result of asynchronous operation
The nng_aio_result() returns the result of the operation associated with the handle aio. If the operation was successful, then 0 is returned. Otherwise a non-zero error code is returned.
Definition at line 179 of file op.h.
References nngxx::success.
|
inline |
Definition at line 65 of file op.h.
References pars::debug(), pars::err(), nametype(), pars::net, pars::net::out, pars::ev::enqueuer::queue_fire(), pars::ev::enqueuer::queue_sent(), SL, and pars::ev::serialize::to_network().

|
inline |
Definition at line 145 of file op.h.
|
inline |
stop asynchronous I/O operation
The stop() function stops the asynchronous I/O operation associated with aio by aborting with NNG_ECANCELED, and then waits for it to complete or to be completely aborted, and for the callback associated with the aio to have completed executing.
Definition at line 234 of file op.h.
Referenced by reset_sleep().

|
inline |