17 #ifndef HH_SENF_Scheduler_WriteHelper_ 18 #define HH_SENF_Scheduler_WriteHelper_ 1 22 #include <boost/intrusive_ptr.hpp> 23 #include <boost/function.hpp> 46 template <
class Handle>
54 typedef boost::intrusive_ptr<WriteHelper>
ptr;
77 std::string
const &
data()
const;
93 static void dispatchProcess(ptr helper, Handle
handle,
100 mutable std::string data_;
103 mutable std::string::iterator offset_;
Asynchronous writing helper.
bool complete() const
Check whether the write has completed successfully.
boost::intrusive_ptr< WriteHelper > ptr
Smart pointer type for this class.
boost::function< void(ptr)> Callback
Callback type.
bool error() const
Check for error condition.
FdDispatcher public header.
void revoke()
Remove the WriteHelper from the scheduler.
void throw_error() const
If an error occurred, throw it.
static ptr dispatch(Handle handle, std::string const &data, Callback callback)
Register new WriteHelper instance.
std::string const & data() const
Return the data.