summaryrefslogtreecommitdiff
path: root/boost/asio/detail/reactor_op.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/detail/reactor_op.hpp')
-rw-r--r--boost/asio/detail/reactor_op.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/boost/asio/detail/reactor_op.hpp b/boost/asio/detail/reactor_op.hpp
index c5964dea37..c2540545d5 100644
--- a/boost/asio/detail/reactor_op.hpp
+++ b/boost/asio/detail/reactor_op.hpp
@@ -34,14 +34,18 @@ public:
// The number of bytes transferred, to be passed to the completion handler.
std::size_t bytes_transferred_;
+ // Status returned by perform function. May be used to decide whether it is
+ // worth performing more operations on the descriptor immediately.
+ enum status { not_done, done, done_and_exhausted };
+
// Perform the operation. Returns true if it is finished.
- bool perform()
+ status perform()
{
return perform_func_(this);
}
protected:
- typedef bool (*perform_func_type)(reactor_op*);
+ typedef status (*perform_func_type)(reactor_op*);
reactor_op(perform_func_type perform_func, func_type complete_func)
: operation(complete_func),