packio
|
The completion_handler class. More...
#include <packio/handler.h>
Public Member Functions | |
~completion_handler () | |
The destructor will notify an error if the completion_handler has not been used. | |
completion_handler (completion_handler &&other) | |
Move constructor. | |
completion_handler & | operator= (completion_handler &&other) |
Move assignment operator. | |
template<typename T > | |
void | set_value (T &&return_value) |
Notify successful completion of the procedure and set the return value. More... | |
void | set_value () |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | set_error (T &&error_value) |
Notify erroneous completion of the procedure with an associated error. More... | |
void | set_error () |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
void | operator() (T &&return_value) |
Same as set_value. | |
void | operator() () |
Same as set_value. | |
The completion_handler class.
Rpc | RPC protocol implementation |
First argument of AsyncProcedure, the completion_handler is a callable used to notify the completion of an asynchronous procedure. You must only call set_value or set_error once.
|
inline |
Notify erroneous completion of the procedure with an associated error.
error_value | Error value |
|
inline |
Notify successful completion of the procedure and set the return value.
return_value | The value that the procedure will return to the client |