/
usr
/
include
/
boost
/
asio
/
/usr/include/boost/asio
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
execution/
-
0755
rm
generic/
-
0755
rm
impl/
-
0755
rm
ip/
-
0755
rm
local/
-
0755
rm
posix/
-
0755
rm
ssl/
-
0755
rm
traits/
-
0755
rm
ts/
-
0755
rm
windows/
-
0755
rm
any_io_executor.hpp
2625
0644
edit
dl
rm
associated_allocator.hpp
3791
0644
edit
dl
rm
associated_executor.hpp
5057
0644
edit
dl
rm
async_result.hpp
19423
0644
edit
dl
rm
awaitable.hpp
3270
0644
edit
dl
rm
basic_datagram_socket.hpp
47521
0644
edit
dl
rm
basic_deadline_timer.hpp
24158
0644
edit
dl
rm
basic_io_object.hpp
8096
0644
edit
dl
rm
basic_raw_socket.hpp
46996
0644
edit
dl
rm
basic_seq_packet_socket.hpp
29184
0644
edit
dl
rm
basic_serial_port.hpp
31912
0644
edit
dl
rm
basic_signal_set.hpp
19876
0644
edit
dl
rm
basic_socket.hpp
65516
0644
edit
dl
rm
basic_socket_acceptor.hpp
88062
0644
edit
dl
rm
basic_socket_iostream.hpp
13298
0644
edit
dl
rm
basic_socket_streambuf.hpp
21713
0644
edit
dl
rm
basic_streambuf.hpp
13714
0644
edit
dl
rm
basic_streambuf_fwd.hpp
920
0644
edit
dl
rm
basic_stream_socket.hpp
41520
0644
edit
dl
rm
basic_waitable_timer.hpp
28528
0644
edit
dl
rm
bind_executor.hpp
16510
0644
edit
dl
rm
buffer.hpp
83254
0644
edit
dl
rm
buffered_read_stream.hpp
8424
0644
edit
dl
rm
buffered_read_stream_fwd.hpp
699
0644
edit
dl
rm
buffered_stream.hpp
9074
0644
edit
dl
rm
buffered_stream_fwd.hpp
669
0644
edit
dl
rm
buffered_write_stream.hpp
8042
0644
edit
dl
rm
buffered_write_stream_fwd.hpp
705
0644
edit
dl
rm
buffers_iterator.hpp
14049
0644
edit
dl
rm
completion_condition.hpp
5500
0644
edit
dl
rm
compose.hpp
4596
0644
edit
dl
rm
connect.hpp
43157
0644
edit
dl
rm
coroutine.hpp
9897
0644
edit
dl
rm
co_spawn.hpp
14509
0644
edit
dl
rm
deadline_timer.hpp
1138
0644
edit
dl
rm
defer.hpp
5070
0644
edit
dl
rm
detached.hpp
3517
0644
edit
dl
rm
dispatch.hpp
4537
0644
edit
dl
rm
error.hpp
10351
0644
edit
dl
rm
execution.hpp
1871
0644
edit
dl
rm
execution_context.hpp
14341
0644
edit
dl
rm
executor.hpp
10467
0644
edit
dl
rm
executor_work_guard.hpp
8039
0644
edit
dl
rm
handler_alloc_hook.hpp
3471
0644
edit
dl
rm
handler_continuation_hook.hpp
1474
0644
edit
dl
rm
handler_invoke_hook.hpp
3744
0644
edit
dl
rm
high_resolution_timer.hpp
1394
0644
edit
dl
rm
io_context.hpp
55226
0644
edit
dl
rm
io_context_strand.hpp
13706
0644
edit
dl
rm
io_service.hpp
861
0644
edit
dl
rm
io_service_strand.hpp
575
0644
edit
dl
rm
is_applicable_property.hpp
1605
0644
edit
dl
rm
is_executor.hpp
1306
0644
edit
dl
rm
is_read_buffered.hpp
1646
0644
edit
dl
rm
is_write_buffered.hpp
1667
0644
edit
dl
rm
multiple_exceptions.hpp
1631
0644
edit
dl
rm
packaged_task.hpp
3358
0644
edit
dl
rm
placeholders.hpp
4146
0644
edit
dl
rm
post.hpp
4760
0644
edit
dl
rm
prefer.hpp
18821
0644
edit
dl
rm
query.hpp
8323
0644
edit
dl
rm
read.hpp
53894
0644
edit
dl
rm
read_at.hpp
27766
0644
edit
dl
rm
read_until.hpp
119477
0644
edit
dl
rm
redirect_error.hpp
1938
0644
edit
dl
rm
require.hpp
14926
0644
edit
dl
rm
require_concept.hpp
9218
0644
edit
dl
rm
serial_port.hpp
1010
0644
edit
dl
rm
serial_port_base.hpp
4975
0644
edit
dl
rm
signal_set.hpp
748
0644
edit
dl
rm
socket_base.hpp
15939
0644
edit
dl
rm
spawn.hpp
11793
0644
edit
dl
rm
ssl.hpp
848
0644
edit
dl
rm
static_thread_pool.hpp
826
0644
edit
dl
rm
steady_timer.hpp
1306
0644
edit
dl
rm
strand.hpp
17193
0644
edit
dl
rm
streambuf.hpp
826
0644
edit
dl
rm
system_context.hpp
2649
0644
edit
dl
rm
system_executor.hpp
22529
0644
edit
dl
rm
system_timer.hpp
1306
0644
edit
dl
rm
this_coro.hpp
1149
0644
edit
dl
rm
thread_pool.hpp
37567
0644
edit
dl
rm
time_traits.hpp
2281
0644
edit
dl
rm
unyield.hpp
381
0644
edit
dl
rm
uses_executor.hpp
2348
0644
edit
dl
rm
use_awaitable.hpp
5821
0644
edit
dl
rm
use_future.hpp
4820
0644
edit
dl
rm
version.hpp
686
0644
edit
dl
rm
wait_traits.hpp
1451
0644
edit
dl
rm
write.hpp
52959
0644
edit
dl
rm
write_at.hpp
29514
0644
edit
dl
rm
yield.hpp
482
0644
edit
dl
rm
Edit:
/usr/include/boost/asio/basic_deadline_timer.hpp
(24158B)
// // basic_deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 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) // #ifndef BOOST_ASIO_BASIC_DEADLINE_TIMER_HPP #define BOOST_ASIO_BASIC_DEADLINE_TIMER_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> #if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \ || defined(GENERATING_DOCUMENTATION) #include <cstddef> #include <boost/asio/any_io_executor.hpp> #include <boost/asio/detail/deadline_timer_service.hpp> #include <boost/asio/detail/handler_type_requirements.hpp> #include <boost/asio/detail/io_object_impl.hpp> #include <boost/asio/detail/non_const_lvalue.hpp> #include <boost/asio/detail/throw_error.hpp> #include <boost/asio/error.hpp> #include <boost/asio/execution_context.hpp> #include <boost/asio/time_traits.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { /// Provides waitable timer functionality. /** * The basic_deadline_timer class template provides the ability to perform a * blocking or asynchronous wait for a timer to expire. * * A deadline timer is always in one of two states: "expired" or "not expired". * If the wait() or async_wait() function is called on an expired timer, the * wait operation will complete immediately. * * Most applications will use the boost::asio::deadline_timer typedef. * * @par Thread Safety * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. * * @par Examples * Performing a blocking wait: * @code * // Construct a timer without setting an expiry time. * boost::asio::deadline_timer timer(my_context); * * // Set an expiry time relative to now. * timer.expires_from_now(boost::posix_time::seconds(5)); * * // Wait for the timer to expire. * timer.wait(); * @endcode * * @par * Performing an asynchronous wait: * @code * void handler(const boost::system::error_code& error) * { * if (!error) * { * // Timer expired. * } * } * * ... * * // Construct a timer with an absolute expiry time. * boost::asio::deadline_timer timer(my_context, * boost::posix_time::time_from_string("2005-12-07 23:59:59.000")); * * // Start an asynchronous wait. * timer.async_wait(handler); * @endcode * * @par Changing an active deadline_timer's expiry time * * Changing the expiry time of a timer while there are pending asynchronous * waits causes those wait operations to be cancelled. To ensure that the action * associated with the timer is performed only once, use something like this: * used: * * @code * void on_some_event() * { * if (my_timer.expires_from_now(seconds(5)) > 0) * { * // We managed to cancel the timer. Start new asynchronous wait. * my_timer.async_wait(on_timeout); * } * else * { * // Too late, timer has already expired! * } * } * * void on_timeout(const boost::system::error_code& e) * { * if (e != boost::asio::error::operation_aborted) * { * // Timer was not cancelled, take necessary action. * } * } * @endcode * * @li The boost::asio::basic_deadline_timer::expires_from_now() function * cancels any pending asynchronous waits, and returns the number of * asynchronous waits that were cancelled. If it returns 0 then you were too * late and the wait handler has already been executed, or will soon be * executed. If it returns 1 then the wait handler was successfully cancelled. * * @li If a wait handler is cancelled, the boost::system::error_code passed to * it contains the value boost::asio::error::operation_aborted. */ template <typename Time, typename TimeTraits = boost::asio::time_traits<Time>, typename Executor = any_io_executor> class basic_deadline_timer { public: /// The type of the executor associated with the object. typedef Executor executor_type; /// Rebinds the timer type to another executor. template <typename Executor1> struct rebind_executor { /// The timer type when rebound to the specified executor. typedef basic_deadline_timer<Time, TimeTraits, Executor1> other; }; /// The time traits type. typedef TimeTraits traits_type; /// The time type. typedef typename traits_type::time_type time_type; /// The duration type. typedef typename traits_type::duration_type duration_type; /// Constructor. /** * This constructor creates a timer without setting an expiry time. The * expires_at() or expires_from_now() functions must be called to set an * expiry time before the timer can be waited on. * * @param ex The I/O executor that the timer will use, by default, to * dispatch handlers for any asynchronous operations performed on the timer. */ explicit basic_deadline_timer(const executor_type& ex) : impl_(ex) { } /// Constructor. /** * This constructor creates a timer without setting an expiry time. The * expires_at() or expires_from_now() functions must be called to set an * expiry time before the timer can be waited on. * * @param context An execution context which provides the I/O executor that * the timer will use, by default, to dispatch handlers for any asynchronous * operations performed on the timer. */ template <typename ExecutionContext> explicit basic_deadline_timer(ExecutionContext& context, typename enable_if< is_convertible<ExecutionContext&, execution_context&>::value >::type* = 0) : impl_(context) { } /// Constructor to set a particular expiry time as an absolute time. /** * This constructor creates a timer and sets the expiry time. * * @param ex The I/O executor that the timer will use, by default, to * dispatch handlers for any asynchronous operations performed on the timer. * * @param expiry_time The expiry time to be used for the timer, expressed * as an absolute time. */ basic_deadline_timer(const executor_type& ex, const time_type& expiry_time) : impl_(ex) { boost::system::error_code ec; impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); boost::asio::detail::throw_error(ec, "expires_at"); } /// Constructor to set a particular expiry time as an absolute time. /** * This constructor creates a timer and sets the expiry time. * * @param context An execution context which provides the I/O executor that * the timer will use, by default, to dispatch handlers for any asynchronous * operations performed on the timer. * * @param expiry_time The expiry time to be used for the timer, expressed * as an absolute time. */ template <typename ExecutionContext> basic_deadline_timer(ExecutionContext& context, const time_type& expiry_time, typename enable_if< is_convertible<ExecutionContext&, execution_context&>::value >::type* = 0) : impl_(context) { boost::system::error_code ec; impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); boost::asio::detail::throw_error(ec, "expires_at"); } /// Constructor to set a particular expiry time relative to now. /** * This constructor creates a timer and sets the expiry time. * * @param ex The I/O executor that the timer will use, by default, to * dispatch handlers for any asynchronous operations performed on the timer. * * @param expiry_time The expiry time to be used for the timer, relative to * now. */ basic_deadline_timer(const executor_type& ex, const duration_type& expiry_time) : impl_(ex) { boost::system::error_code ec; impl_.get_service().expires_from_now( impl_.get_implementation(), expiry_time, ec); boost::asio::detail::throw_error(ec, "expires_from_now"); } /// Constructor to set a particular expiry time relative to now. /** * This constructor creates a timer and sets the expiry time. * * @param context An execution context which provides the I/O executor that * the timer will use, by default, to dispatch handlers for any asynchronous * operations performed on the timer. * * @param expiry_time The expiry time to be used for the timer, relative to * now. */ template <typename ExecutionContext> basic_deadline_timer(ExecutionContext& context, const duration_type& expiry_time, typename enable_if< is_convertible<ExecutionContext&, execution_context&>::value >::type* = 0) : impl_(context) { boost::system::error_code ec; impl_.get_service().expires_from_now( impl_.get_implementation(), expiry_time, ec); boost::asio::detail::throw_error(ec, "expires_from_now"); } #if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move-construct a basic_deadline_timer from another. /** * This constructor moves a timer from one object to another. * * @param other The other basic_deadline_timer object from which the move will * occur. * * @note Following the move, the moved-from object is in the same state as if * constructed using the @c basic_deadline_timer(const executor_type&) * constructor. */ basic_deadline_timer(basic_deadline_timer&& other) : impl_(std::move(other.impl_)) { } /// Move-assign a basic_deadline_timer from another. /** * This assignment operator moves a timer from one object to another. Cancels * any outstanding asynchronous operations associated with the target object. * * @param other The other basic_deadline_timer object from which the move will * occur. * * @note Following the move, the moved-from object is in the same state as if * constructed using the @c basic_deadline_timer(const executor_type&) * constructor. */ basic_deadline_timer& operator=(basic_deadline_timer&& other) { impl_ = std::move(other.impl_); return *this; } #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the timer. /** * This function destroys the timer, cancelling any outstanding asynchronous * wait operations associated with the timer as if by calling @c cancel. */ ~basic_deadline_timer() { } /// Get the executor associated with the object. executor_type get_executor() BOOST_ASIO_NOEXCEPT { return impl_.get_executor(); } /// Cancel any asynchronous operations that are waiting on the timer. /** * This function forces the completion of any pending asynchronous wait * operations against the timer. The handler for each cancelled operation will * be invoked with the boost::asio::error::operation_aborted error code. * * Cancelling the timer does not change the expiry time. * * @return The number of asynchronous operations that were cancelled. * * @throws boost::system::system_error Thrown on failure. * * @note If the timer has already expired when cancel() is called, then the * handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t cancel() { boost::system::error_code ec; std::size_t s = impl_.get_service().cancel(impl_.get_implementation(), ec); boost::asio::detail::throw_error(ec, "cancel"); return s; } /// Cancel any asynchronous operations that are waiting on the timer. /** * This function forces the completion of any pending asynchronous wait * operations against the timer. The handler for each cancelled operation will * be invoked with the boost::asio::error::operation_aborted error code. * * Cancelling the timer does not change the expiry time. * * @param ec Set to indicate what error occurred, if any. * * @return The number of asynchronous operations that were cancelled. * * @note If the timer has already expired when cancel() is called, then the * handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t cancel(boost::system::error_code& ec) { return impl_.get_service().cancel(impl_.get_implementation(), ec); } /// Cancels one asynchronous operation that is waiting on the timer. /** * This function forces the completion of one pending asynchronous wait * operation against the timer. Handlers are cancelled in FIFO order. The * handler for the cancelled operation will be invoked with the * boost::asio::error::operation_aborted error code. * * Cancelling the timer does not change the expiry time. * * @return The number of asynchronous operations that were cancelled. That is, * either 0 or 1. * * @throws boost::system::system_error Thrown on failure. * * @note If the timer has already expired when cancel_one() is called, then * the handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t cancel_one() { boost::system::error_code ec; std::size_t s = impl_.get_service().cancel_one( impl_.get_implementation(), ec); boost::asio::detail::throw_error(ec, "cancel_one"); return s; } /// Cancels one asynchronous operation that is waiting on the timer. /** * This function forces the completion of one pending asynchronous wait * operation against the timer. Handlers are cancelled in FIFO order. The * handler for the cancelled operation will be invoked with the * boost::asio::error::operation_aborted error code. * * Cancelling the timer does not change the expiry time. * * @param ec Set to indicate what error occurred, if any. * * @return The number of asynchronous operations that were cancelled. That is, * either 0 or 1. * * @note If the timer has already expired when cancel_one() is called, then * the handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t cancel_one(boost::system::error_code& ec) { return impl_.get_service().cancel_one(impl_.get_implementation(), ec); } /// Get the timer's expiry time as an absolute time. /** * This function may be used to obtain the timer's current expiry time. * Whether the timer has expired or not does not affect this value. */ time_type expires_at() const { return impl_.get_service().expires_at(impl_.get_implementation()); } /// Set the timer's expiry time as an absolute time. /** * This function sets the expiry time. Any pending asynchronous wait * operations will be cancelled. The handler for each cancelled operation will * be invoked with the boost::asio::error::operation_aborted error code. * * @param expiry_time The expiry time to be used for the timer. * * @return The number of asynchronous operations that were cancelled. * * @throws boost::system::system_error Thrown on failure. * * @note If the timer has already expired when expires_at() is called, then * the handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t expires_at(const time_type& expiry_time) { boost::system::error_code ec; std::size_t s = impl_.get_service().expires_at( impl_.get_implementation(), expiry_time, ec); boost::asio::detail::throw_error(ec, "expires_at"); return s; } /// Set the timer's expiry time as an absolute time. /** * This function sets the expiry time. Any pending asynchronous wait * operations will be cancelled. The handler for each cancelled operation will * be invoked with the boost::asio::error::operation_aborted error code. * * @param expiry_time The expiry time to be used for the timer. * * @param ec Set to indicate what error occurred, if any. * * @return The number of asynchronous operations that were cancelled. * * @note If the timer has already expired when expires_at() is called, then * the handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t expires_at(const time_type& expiry_time, boost::system::error_code& ec) { return impl_.get_service().expires_at( impl_.get_implementation(), expiry_time, ec); } /// Get the timer's expiry time relative to now. /** * This function may be used to obtain the timer's current expiry time. * Whether the timer has expired or not does not affect this value. */ duration_type expires_from_now() const { return impl_.get_service().expires_from_now(impl_.get_implementation()); } /// Set the timer's expiry time relative to now. /** * This function sets the expiry time. Any pending asynchronous wait * operations will be cancelled. The handler for each cancelled operation will * be invoked with the boost::asio::error::operation_aborted error code. * * @param expiry_time The expiry time to be used for the timer. * * @return The number of asynchronous operations that were cancelled. * * @throws boost::system::system_error Thrown on failure. * * @note If the timer has already expired when expires_from_now() is called, * then the handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t expires_from_now(const duration_type& expiry_time) { boost::system::error_code ec; std::size_t s = impl_.get_service().expires_from_now( impl_.get_implementation(), expiry_time, ec); boost::asio::detail::throw_error(ec, "expires_from_now"); return s; } /// Set the timer's expiry time relative to now. /** * This function sets the expiry time. Any pending asynchronous wait * operations will be cancelled. The handler for each cancelled operation will * be invoked with the boost::asio::error::operation_aborted error code. * * @param expiry_time The expiry time to be used for the timer. * * @param ec Set to indicate what error occurred, if any. * * @return The number of asynchronous operations that were cancelled. * * @note If the timer has already expired when expires_from_now() is called, * then the handlers for asynchronous wait operations will: * * @li have already been invoked; or * * @li have been queued for invocation in the near future. * * These handlers can no longer be cancelled, and therefore are passed an * error code that indicates the successful completion of the wait operation. */ std::size_t expires_from_now(const duration_type& expiry_time, boost::system::error_code& ec) { return impl_.get_service().expires_from_now( impl_.get_implementation(), expiry_time, ec); } /// Perform a blocking wait on the timer. /** * This function is used to wait for the timer to expire. This function * blocks and does not return until the timer has expired. * * @throws boost::system::system_error Thrown on failure. */ void wait() { boost::system::error_code ec; impl_.get_service().wait(impl_.get_implementation(), ec); boost::asio::detail::throw_error(ec, "wait"); } /// Perform a blocking wait on the timer. /** * This function is used to wait for the timer to expire. This function * blocks and does not return until the timer has expired. * * @param ec Set to indicate what error occurred, if any. */ void wait(boost::system::error_code& ec) { impl_.get_service().wait(impl_.get_implementation(), ec); } /// Start an asynchronous wait on the timer. /** * This function may be used to initiate an asynchronous wait against the * timer. It always returns immediately. * * For each call to async_wait(), the supplied handler will be called exactly * once. The handler will be called when: * * @li The timer has expired. * * @li The timer was cancelled, in which case the handler is passed the error * code boost::asio::error::operation_aborted. * * @param handler The handler to be called when the timer expires. Copies * will be made of the handler as required. The function signature of the * handler must be: * @code void handler( * const boost::system::error_code& error // Result of operation. * ); @endcode * Regardless of whether the asynchronous operation completes immediately or * not, the handler will not be invoked from within this function. On * immediate completion, invocation of the handler will be performed in a * manner equivalent to using boost::asio::post(). */ template < BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code)) WaitHandler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WaitHandler, void (boost::system::error_code)) async_wait( BOOST_ASIO_MOVE_ARG(WaitHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)) { return async_initiate<WaitHandler, void (boost::system::error_code)>( initiate_async_wait(this), handler); } private: // Disallow copying and assignment. basic_deadline_timer(const basic_deadline_timer&) BOOST_ASIO_DELETED; basic_deadline_timer& operator=( const basic_deadline_timer&) BOOST_ASIO_DELETED; class initiate_async_wait { public: typedef Executor executor_type; explicit initiate_async_wait(basic_deadline_timer* self) : self_(self) { } executor_type get_executor() const BOOST_ASIO_NOEXCEPT { return self_->get_executor(); } template <typename WaitHandler> void operator()(BOOST_ASIO_MOVE_ARG(WaitHandler) handler) const { // If you get an error on the following line it means that your handler // does not meet the documented type requirements for a WaitHandler. BOOST_ASIO_WAIT_HANDLER_CHECK(WaitHandler, handler) type_check; detail::non_const_lvalue<WaitHandler> handler2(handler); self_->impl_.get_service().async_wait( self_->impl_.get_implementation(), handler2.value, self_->impl_.get_executor()); } private: basic_deadline_timer* self_; }; detail::io_object_impl< detail::deadline_timer_service<TimeTraits>, Executor> impl_; }; } // namespace asio } // namespace boost #include <boost/asio/detail/pop_options.hpp> #endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) // || defined(GENERATING_DOCUMENTATION) #endif // BOOST_ASIO_BASIC_DEADLINE_TIMER_HPP
Save
cmd:
run