summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/include/asio/detail/select_reactor.hpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/include/asio/detail/select_reactor.hpp')
-rw-r--r--3rdparty/asio/include/asio/detail/select_reactor.hpp33
1 files changed, 25 insertions, 8 deletions
diff --git a/3rdparty/asio/include/asio/detail/select_reactor.hpp b/3rdparty/asio/include/asio/detail/select_reactor.hpp
index 7f9b55b2174..cb3e525a1d0 100644
--- a/3rdparty/asio/include/asio/detail/select_reactor.hpp
+++ b/3rdparty/asio/include/asio/detail/select_reactor.hpp
@@ -2,7 +2,7 @@
// detail/select_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -90,10 +90,7 @@ public:
per_descriptor_data& descriptor_data, reactor_op* op);
// Post a reactor operation for immediate completion.
- void post_immediate_completion(reactor_op* op, bool is_continuation)
- {
- scheduler_.post_immediate_completion(op, is_continuation);
- }
+ void post_immediate_completion(reactor_op* op, bool is_continuation);
// Start a new operation. The reactor operation will be performed when the
// given descriptor is flagged as ready, or an error has occurred.
@@ -105,14 +102,28 @@ public:
// operation_aborted error.
ASIO_DECL void cancel_ops(socket_type descriptor, per_descriptor_data&);
+ // Cancel all operations associated with the given descriptor and key. The
+ // handlers associated with the descriptor will be invoked with the
+ // operation_aborted error.
+ ASIO_DECL void cancel_ops_by_key(socket_type descriptor,
+ per_descriptor_data& descriptor_data,
+ int op_type, void* cancellation_key);
+
// Cancel any operations that are running against the descriptor and remove
- // its registration from the reactor.
+ // its registration from the reactor. The reactor resources associated with
+ // the descriptor must be released by calling cleanup_descriptor_data.
ASIO_DECL void deregister_descriptor(socket_type descriptor,
per_descriptor_data&, bool closing);
- // Remote the descriptor's registration from the reactor.
+ // Remove the descriptor's registration from the reactor. The reactor
+ // resources associated with the descriptor must be released by calling
+ // cleanup_descriptor_data.
ASIO_DECL void deregister_internal_descriptor(
- socket_type descriptor, per_descriptor_data& descriptor_data);
+ socket_type descriptor, per_descriptor_data&);
+
+ // Perform any post-deregistration cleanup tasks associated with the
+ // descriptor data.
+ ASIO_DECL void cleanup_descriptor_data(per_descriptor_data&);
// Move descriptor registration from one descriptor_data object to another.
ASIO_DECL void move_descriptor(socket_type descriptor,
@@ -141,6 +152,12 @@ public:
typename timer_queue<Time_Traits>::per_timer_data& timer,
std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
+ // Cancel the timer operations associated with the given key.
+ template <typename Time_Traits>
+ void cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key);
+
// Move the timer operations associated with the given timer.
template <typename Time_Traits>
void move_timer(timer_queue<Time_Traits>& queue,